colors

iPhone: How to Determine Average Light/Dark of an Area of an UIImage

I need to place labels with a transparent background over a variable-content UIImage. Readability will vary significantly depending on the relationship between the color of the label's text and the color/luminosity of the area of the image displayed under the label. Since the image will be constantly changing, the color of the label's te...

Can color cycling be achieved in GDI+?

Is "color cycling" possible in GDI+ with WinForms? I'd like the modify one or more colors in the palette of an on screen surface so that whenever the surface is repainted, GDI+ will use the modified colors. Rather than perform the transformation manually pixel-by-pixel, I hope to use GDI+'s capability to render surfaces using indexed...

Preserve colouring after piping grep to grep

There is a simlar question in Preserve ls colouring after grep’ing but it annoys me that if you pipe colored grep output into another grep that the coloring is not preserved. As an example grep --color WORD * | grep -v AVOID does not keep the color of the first output. But for me ls | grep FILE do keep the color, why the difference ? ...

How to generate n different colors for any natural number n?

Say n = 100; How do I generate 100 visually distinct colors? Is this mathematically possible? ...

css style hex strings and Color.decode

this article suggests you can use Color c = Color.decode("FF0096"); however this understandably throws an exception Caused by: java.lang.NumberFormatException: For input string: "FF0096" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:449) at java.la...

DX TreeList - How to chango color of some Node

Hello, i have DX treeList, it has some functionality like copy, paste, delete and so on. How to do in C# code, to change some Node color to change to some other color? ...

Extracting rgb color components from integer value

Hi, if there is an integer value, eg. 86 then how can i extraact the r,g,b components from this integer value....? I am working on Visual C++ 2008 express edition. Thanks.. ...

How to set alpha value of drawRoundRect object

Ok I know this practically sounds elementary, but I don't understand what I'm not doing correct here. I draw a simple rounded Rect backing1.graphics.beginFill(bgColor); backing1.graphics.lineStyle(borderSize, borderColor1); backing1.graphics.drawRoundRect(position1, position1, sizeW-1, sizeH-1, cornerRadius1); backing1.graphics.endFill...

How can I store HTML color codes in a MySQL database then search for a range or colors?

I have a script that extracts the mostly commonly occurring colors from an image. I want to store this data in MySQL then be able to pull out images based on the clicking of a color. For example if the user clicks on a red color I want to pull out other images that have a high count for "red" colors. I'm not sure how to search within a r...

Global CSS Color Scheme / Skin

I am constucting a site using CSS that needs to be skinnable / brandable. In technical terms, for each "brand" I have a set of five color values in a database. What I want to do is construct CSS files so that the color scheme of the entire site is unified and the colors are reused, so I can change the value in one place and it changes t...

Why doesn't this Javascript RGB to HSL code work?

I found this RGB to HSL script over at http://www.mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript. I can't find any other small decent ones. The issue is that this code doesn't even really work. Would anybody know why? (I don't know a bit of color math, but maybe it's returning the complem...

UIView Animation wont Delay!

I have a simple UIView backgroundColor transition running on its own thread as such: - (void)colorLoop_thread { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; // [self performSelector:@selector(changeColors)]; [self performSelectorOnMainThread:@selector(changeColors) withObject:nil waitUntilDone:NO]; [pool release]; } ...

HSL to RGB color conversion

Hi I am looking for a tool to convert between HSL color to RGB. HSL is not a very widely used so I am not having much luck googling for a converter. If you know of one, or an easily implementable algorithm it would be much appreciated. ...

How can I print to the console in color on Mac OS X in a cross-platform manner?

How can I output colored text using "printf" on both Mac OS X and Linux? ...

Dynamically creating colors with different brightness

Hi. I have a color, which I only know at runtime. Using this color i want to create two new colors, one very bright and one none bright version of the color. So to clarify, say i have the color Red; I want to create the hex-value for a "Light red" color, and a "Dark red" color. How would i go about doing this? My code is written in Jav...

How to Fill the gradient color in JFreeChart PieChart3D?

I want to fill the PieChart3D with a gradient color, I am using JFreeChart for drawing the graph. but it is not filling with gradient color rather than it is filled with a solid color.. Here is the code I am using for changing the color. public void setColor(PiePlot3D plot, PieDataset dataset) { GradientPaint gp0 = new GradientP...

Where can I get lots of distinguishable colors for a chart?

Hello, I'm looking for a list of about thirty colors (RGB values) that are sufficently different so that when used in a bar chart the user can match each bar to that color in the legend. Does anyone have such a list of colors? Thanks, AJ ...

Why converting jpeg to colour profile in GIMP reduce the size so much?

I have a 2MB JPEG image, and when I use the option Image > Mode > Convert to colour Profile, the size get reduced to 50KB without to much quality loss. Could somebody explain why is the size so reduced? Am I missing some important point? ...

Cannot change borderColor of TD

Using JS to set the background color of a TD is fine. But, setting the border color is problematic in FF 3.0.18 although IE 6 doesn't experience this. FF is problematic in that it requires the TD element to have an attribute style initialized to border-style: solid. Without that, setting border color of a TD won't work. Is this known bug...

Plot inverse colors in Matlab?

I'm plotting on top of an image in Matlab. Sometimes, I can't see what's being plotted because the color of the image underneath is too close to the color of the image at the same location. I could just always change the color of the plot (e.g. from 'rx' to 'bx'), but that's cumbersome. Is it possible to plot the inverse color of what...