Questions tagged [color-palette]

0

votes
0

answer
13

Views

EmguCV read 8 bit image from byte array

I have a byte array which contains the data of PNG8 (Color palette and indexes of colors). I need to create Image (or at least simply Bitmap) from my byte array. I haven't problems with PNG24 or PNG32: byte type; int height, width; byte[] data; ... // Initializing type, height, width and data with B...
Vlad i Slav
1

votes
2

answer
273

Views

Calculating palettes from an initial color

I'm a bit confused by implementation ambiguities - for instance rotating the hue wheel by 180 degrees "feels" right for getting a complementary color, but at the same time Adobe Kuler produces identical output for both dark and light shades of the "seed" color. I'm not sure if this is a bug/feature...
o.v.
1

votes
1

answer
1.7k

Views

Getting pixels color index from TIFF with palette

I've got TIFF with 256 byte color palette. In Java I read this TIFF to BufferedImage. This BufferedImage has IndexColorModel. When I iterate through pixels in BufferedImage, I can only get RGB. I want to write method, which for x,y gets original color index from palette using BufferedImage (not RGB...
Arek Woźniak
1

votes
1

answer
1.2k

Views

Custom palette in the ColorPicker

I would like to change the color palette. The colors are by default have a transparency of 30%. Is it possible to replace the color palette?
espirio
2

votes
0

answer
97

Views

Add seaborn.palplot axes to existing figure for visualisation of different color palettes

Adding seaborn figures to subplots is usually done by passing 'ax' when creating the figure. For instance: sns.kdeplot(x, y, cmap=cmap, shade=True, cut=5, ax=ax) This method, however, doesn't apply to seaborn.palplot, which visualizes seaborn color palettes. My goal is to create a figure of differen...
David de L.
18

votes
1

answer
4.3k

Views

Differences between Android Palette colors

Edit To get a better feel for the Android Palette class, I decided to make a simple app to test some of its features - if you are interested, you can find the app on the Play Store: https://play.google.com/store/apps/details?id=com.tonyw.sampleapps.palettecolorextraction. Basically it just has image...
Tony Wickham
2

votes
1

answer
409

Views

memory problems with imageMagick?

I have problems using convert F:\path\source.png -define registry:temporary-path=F:\path -limit area 0 -type palette -colors 256 F:\path\target.png the temporary-path and my source and target images are on an external hard drive. I used area 0 because I don't want ImageMagick to use my systems memor...
Selphiron
1

votes
3

answer
1k

Views

How to extend dijit/ColorPalette with custom color (particular with transparent)

I use standard digit ColorPalette in my widget. It is simple tool and it works fine. But I need to expand it with transparent or none color. I can deal with it in few ways: Add just a button near the Palette to clear the color Copy all code from dijit/ColorPalette to make custom Palette in my module...
Serg
6

votes
2

answer
2.7k

Views

PNG - Is it possible to reduce the palette using Java 2D?

If I have a PNG image opened as a BufferedImage, is it possible to reduce the palette in the PNG image so that there is less colour (less bits per pixel / colour depth)? For example, if you look at Colour depth in Wikipedia, I would like to use 16 colours in my PNG image (3rd image down the right ha...
Joeblackdev
20

votes
5

answer
20.4k

Views

Simple swift color picker popover (iOS)

Is there is a simple way to implement a color picker popover in swift? Are there any built-in libraries or UI elements that I could leverage for this purpose? I saw some color pickers written in objective-c, but they were several years old and I was wondering if there was something more recent.
Ethan Strider
21

votes
6

answer
10.1k

Views

How can I generate a palette of prominent colors from an image?

I'm trying to figure out how to sample all of the pixels in an image and generate a palette of colors from it, something like this or this. I have no idea where to even begin. Can anyone point me in the right direction? __EDIT: __ This is what I've ended up with so far: I used this Pixelate function...
scottm
3

votes
2

answer
275

Views

How can I attach a list of custom color palettes to a list of ggplot objects without printing each plot object to the screen?

I have a data frame in R in which several of the columns are factors. I'd like to create a series of bar charts showing the relative sizes of each of the factor levels. I want to associate my own customized color palettes to each of the factors, and then customize the final layout of all of the ba...
stachyra
4

votes
4

answer
2.1k

Views

How to make a color progression out of a color palette

My goal with this algorithm I'm working on is to output a color progression out of some provided colors. By color progression I mean creating the "fade" effect between two colors (color A, color B) and store every color value ((R,G,B) tuple) in between. For example, if what is provided is total bla...
Daniel Wright
11

votes
6

answer
15.3k

Views

MS Chart for .NET predefined palettes color list?

Microsoft Chart for .NET (3.5, 4.x) has predefined palettes e.g. Berry, Bright, SeaGreen etc. Is there anywhere a list of colors for each palette (hex or named)? Thanks!
Yuriy Galanter
2

votes
2

answer
138

Views

How to create and use very large palette textures for use in opengl?

Details: I have a glsl fragment shader with a uniform texture, "u_MapTexture" with several thousand colors on it (max of about 10k-15k unique rgb values). I also have a uniform palette texture ("u_paletteTexture") that is 16384 × 1 that I want to use to index the colors on u_MapTexture to. My probl...
1

votes
4

answer
135

Views

Abstract fields implemented by static final class?

I'm trying to create custom color palettes for my Android app. I started doing it this way: public class Theme { public static final class DARK { final static int POSITIVE_GREEN = Color.rgb(0, 200, 0); final static int NEGATIVE_RED = Color.rgb(200, 0, 0); final static int BACKGROUND_GREEN = Color.a...
GameKyuubi
1

votes
2

answer
3.5k

Views

Convert 24-bit image RGB to 3-bit 8-color

I am able with an BufferedImage to obtain the RGB values for every pixel of a 640x640 image, the output looks like this: [...] Pixel :(640, 634) RGB: 166 94 82 Pixel :(640, 635) RGB: 166 94 80 Pixel :(640, 636) RGB: 163 91 77 Pixel :(640, 637) RGB: 157 88 73 Pixel :(640, 638) RGB: 157 88 73 Pixel :(...
JF Beaulieu
3

votes
2

answer
6.4k

Views

Display custom color dialog directly- JavaFX ColorPicker

I need to show a "continuous" color palette for color selection inside a ContextMenu. Similar to CustomColorDialog that pops up on ColorPicker. Is there a different class for this purpose or is it possible to work around by extending ColorPicker and showing directly CustomColorDialog instead of fi...
Ruturaj Patil
3

votes
1

answer
1.4k

Views

gnuplot text color palette

I am trying to set textcolor property of a label in gnuplot to transition through a palette of colours. To be more precise, I want each letter of the label, say "Number of Connections", to be a different color but following the color palette I specify. I tried using the following method, but it fail...
5

votes
1

answer
3.4k

Views

How can one mix 2 or more color palettes to show a combined color value

I'm trying to create a plot where color represents the combination of several values. In the example below, I am applying increasing values for red associated with the x-coordinate and increasing values for blue in associated with the y-coordinate. #required function 'val2col' from: http://www.menu...
Marc in the box
2

votes
1

answer
190

Views

How to set the color palette in the .Rprofile

I'd like to change the Color palette on startup of R. Thus I copied the following source-code to my .Rprofile palette(c( "#2e3436" # (Aluminium 6) , "#ef2929" # (Scarlet Red 1) , "#73d216" # (Chameleon 2) , "#3465a4" # (Sky Blue 2) , "#fcaf3e" # (Orange 1) , "#ad7fa8" # (Plum 1) , "#babdb6" # (But...
R_User
2

votes
2

answer
2.2k

Views

Algorithm for shrinking/limiting palette of an image

as input data I have a 24 bit RGB image and a palette with 2..20 fixed colours. These colours are in no way spread regularly over the full colour range. Now I have to modify the colours of input image so that only the colours of the given palette are used - using the colour out of the palette that i...
Elmi
23

votes
1

answer
31.3k

Views

how do I substitute one colour for another, in every object, of an eps file? [closed]

I have a vector image that I need to edit and I have inkscape. What I want to do is to substitute one set of coulours of the palette by another. For example, my image has a palette with several tones of orange, green and blue. What do I have to do if I want to substitute the orange part of the palet...
csbl81
2

votes
1

answer
1.4k

Views

How to reduce image palette to specific colors?

I am playing with a program in Python to create cross stitch schemes and need to reduce colors in an image to specific floss colors like this. Not necessary to use all the colors from the floss palette. On Python or Pseudocode. Example Custom palette (in PILL/Pillow for example) is not situable. The...
Pylyp
2

votes
1

answer
884

Views

finding the closest web safe color if I have a palette

How do I take r,g,b values and compare them to a websafe color palette to find the best match for the r,g,b value? There's this one: What is the best algorithm for finding the closest color in an array to another color? But I don't think it's what I need. I just need to compare an r,g,b with a websa...
Scott
1

votes
1

answer
541

Views

How to make a plot of positions with palette in Gnuplot?

How can I make a plot with some values of delta_x and delta_y positions; where I need to use palette (or colorbars) for each point showing their respective epochs (My current plot, and an example of the plot that I would like to make are shown below). My current Gnuplot code is as follows: set fontp...
A_V
1

votes
2

answer
972

Views

How to get colors from current app theme from within layout.xml?

I've made an app using only one theme, but now I want the user to be able to change it during runtime. As some layout elements need to be colored using a specific color, all my layout.xml-s have proprieties like android:background="@color/colorBackground" or something of the sort. Currently, I have...
Jadarma
5

votes
2

answer
4.7k

Views

Are there standard 8-bit color palettes?

I'm attempting to reverse engineer a file format from a logging program. It seems to use a 1-2 byte field which may be used for label colors, as it seems to be the only thing that's unexplained. Short of iterating through other label colors and generating new output files (which is a pain in the a...
Nick T
1

votes
2

answer
2.5k

Views

drawing rainbow palettes

I have a 8-bit color palette, therefore I am having 256 colors. The palette is basically an array of [256 * 3] {r, g, b} values, Now I need to draw a color spectrum out of it. So basically I have to select 256 out of total 256*256*256 values possible which would enable me to draw the rainbow as clos...
sud03r
1

votes
2

answer
1k

Views

OpenGL Color Index for iPhone's OpenGL ES 1.1?

Is it possible to use color pallettes in openGL ES 1.1? I'm currently developing a game which has player sprites, and the player sprites need to be able to be changed to different teams' colors. For example, changing the shirts' colors but not the face colors, which rules out simple hue rotation. Is...
kamziro
7

votes
2

answer
4.5k

Views

Override OxyPlot default color palette

I've been making use of OxyPlot lately, and was wondering if there is a way of overriding the default Color Palette of PlotSeries / PlotModel? I know i can set the color individually for each series, but it would be nice to have an array of color and then apply it to the model / series.
stoic
2

votes
2

answer
2.8k

Views

Converting truecolor RGB image to indexed colors

I want to convert a 24bit RGB image (8 bit for each channel) 8 bit using an indexed color palette. My initial idea was to create an array and simply count the amount of times each color was represented in the image, but I figured it would be wasteful if there were large areas with slight change in c...
Frederik
3

votes
1

answer
162

Views

Algorithm to Color Nodes Hierarchically

I have a network where the nodes are defined hierarchically (via UN SITC coding). In my application, each node has four identifying digits of increasing hierachical specificity (for example, see product 7431) but the network that I've defined is not just the obvious hierachical structure. What I'm...
mmdanziger
3

votes
2

answer
1.5k

Views

Semi-transparent colors in Google Charts?

A call like chart.draw(data, { colors: ['#e0440e', '#e6693e', '#ec8f6e', ...], ... }); creates a chart with colors looking like semi-transparent. However, we passed RGB colors, with no alpha parameter! In other chart apps (like jqPlot, CanvasJS etc) you may pass rgba calls instead, like in [ 'rgba(2...
Cristi S.
6

votes
1

answer
1.5k

Views

libGDX: treat first color in palette as transparent color

old game engines designate the first color of an image's palette as a transparent color. is there a way to do the same with libGDX? i tried loading the picture and replacing the palete's first color with 0x00000000. however since the pixels are either opaque or transparent i dont need alpha values s...
Shinni
1

votes
1

answer
769

Views

ggplot2: dealing with extremes values by setting a continuous color scale

I am trying to plot some global maps (raster files) and I have some problems in setting up a good color scale for my data. What I would like to do is to plot my data using a divergent palette (e.g. cm.colors), and I would like to center the color "white" of such scale with the value zero, but withou...
PietroB
4

votes
2

answer
9.5k

Views

Accessing javascript functions defined in different files

I am having two seemingly related problems accessing javascript function defined in different places. The first problem I am having is calling function I have defined from the console of firgbug or safari. I defined a function called getRed the looks like this: function getRed(row, col) { // do so...
Mike2012
3

votes
1

answer
581

Views

How to set up asymmetrical color gradient for a numerical variable in leaflet in R

I want to have leaflet color palette centered to zero (with Red-white-green diverging). I have tried what has been told in this post. When I tried this manual creation of colors, I got the red green divergence but couldn't able to center it to zero. My Code [email protected]
Murali
1

votes
1

answer
2.3k

Views

gnuplot: set palette labels with smallest numbers on top

I am making palette in gnuplot using commands: set pm3d implicit at b set palette model RGB maxcolors 5 set cbrange [0:20] set palette model RGB defined (4 '#006400', 8 '#00008B', 12 'blue', 16 '#C71585', 20 'red') set cbtics 4 This way I get order 20,16,12,8,4,0 from top to bottom on my vertical pa...
Perlnika
2

votes
2

answer
3.7k

Views

How to fill histogram with color gradient?

I have a simple problem. How to plot histogram with ggplot2 with fixed binwidth and filled with rainbow colors (or any other palette)? Lets say I have a data like that: myData
Art

View additional questions