colors

OCR: How to find the right ColorMatrix to define new colors?

Hi, I'm stuck right now with defining the dimension of each line. The list I want to scrape has various colors in it, and what disturbs me the most a selection: http://img18.imageshack.us/img18/210/lobbymd9.jpg As you can see the picture I try to analyze got a white background with green text. The selection background is grey with bl...

"kCGColorSpaceGenericRGB" is deprecated on iPhone?

I'm trying to get bitmap context with the following code: GContextRef MyCreateBitmapContext (int pixelsWide, int pixelsHigh) { CGContextRef context = NULL; CGColorSpaceRef colorSpace; void * bitmapData; int bitmapByteCount; int bitmapBytesPerRow; bitma...

What's so special about the greenish-blue color? Why is it so popular in web design?

I've noticed that this color is somehow preferred over pure blue or blue-violet. Vista and Windows 2008 have largely adopted this color. Many dating sites seem to prefer this one over blue or violet. Is it so that this color is associated with ocean water color and provides some kind of relaxation to the site visitors or is it something ...

How to pull out the ARGB component from BitmapContext on iPhone?

I'm trying to get ARGB components from CGBitmapContext with the following codes: -(id) initWithImage: (UIImage*) image //create BitmapContext with UIImage and use 'pixelData' as the pointer { CGContextRef context = NULL; CGColorSpaceRef colorSpace; int bitmapByteCount; int bitmapBytesPe...

What UNIX commands support coloured output?

I enjoy using UNIX/bash commands that support coloured output. Consequently, I have a few aliases defined which automatically enable coloured output of the commands that I know support this option. However, I'm sure there are hundreds of commands out there that support coloured output - I'd like to know what they are. The ones in my ~...

How to set a string's colour before printing it to screen.

Hello. Does anyone know how I would set the colour of a string before printing it so that the string changes colour? Thanks. ...

Possible to draw in YCbCr in Java?

Hi everyone, I've a project at the moment, in Java, which uses a filetype which is inherently in the YCbCr colorspace. Within this, there is a lot of number crunching happening behind the scenes (which I've had to code) to convert to RGB from the YCbCr values. This is done per-pixel, per-frame, at 25 frames per second... The project mu...

iPhone: Flashing Colours

I am trying to get the iPhone background Color to change color every X number of seconds. How can I do this? I've been trying a UIAnimation but can only get it to change to the very last color in a list. Thanks alot! ...

RichTextBox color selected lines

Hello, I am new to windows Forms. I am using VS 2008, C# to write a RichTextBox. I want to be able to color each line with a different color as I write to the RichTextBox. Can someone point me to samples. Thanks foreach (string file in myfiles) { // As I process my files // richTextBox1.Text += "My processing results"; if(file ==...

.NET - Converting Color Name Strings into System.Drawing.Color

What is the best way to turn strings like "red", "green", "yellow", "aliceblue", etc... into the actual System.Drawing.Color value? I was looking at reflection and something about that didn't seem right. ...

How do I make an HTML element repaint within a Javascript loop?

I have some Javascript which "animates" a colour change on an HTML element, as follows: var element = document.getElementById("someid"); while (i < 255) { element.style.color = 'rgb(' + i + ',' + i + ',' + i + ')'; i++; slowMeDown(); // This function runs for a few ms to slow the process down } As you can see, this changes...

What does this mysterious Color Method do? What does it return?

Maybe I've had too much coffee, maybe I've been working too long, regardless, I'm at a loss as to what this method does, or rather, why and how it does it, could anyone shed some light upon me? What is the nextColor? public Color nextColor() { int max = 0, min = 1000000000, cr = 0, cg = 0, cb = 0; for (int r = 0; r < 256; r += 4) ...

wxPython wxListCtrl selected row color

I want to have certain rows selected color be red instead of the standard color (blue on windows) so that I can indicate status. Anyone know if this is possible in wxPython? ...

Formula to determine brightness of RGB color

I'm looking for some kind of formula or algorithm to determine the brightness of a color given the RGB values. I know it can't be as simple as adding the RGB values together and having higher sums be brighter, but I'm kind of at a loss as to where to start. ...

Flex/Actionscript White to Transparent

I am trying to write something in my Flex 3 application with actionscript that will take an image and when a user clicks a button, it will strip out all the white(ish) pixels and convert them to transparent, I say white(ish) because I have tried exactly white, but I get a lot of artifacts around the edges. I have gotten somewhat close us...

Where can I find colored indicators for use in Cocoa?

I need color indicators. Need to be able to do green, yellow and red. Anybody know how? I looked through the available icons/etc in Interface Builder but did not see anything like them. Like this: ...

How do I have different font colors in a textarea?

I want the font color to change in a textarea as I type in specific keywords, like in Visual Studio. I have not seen this anywhere, so I don't know if this is possible with HTML and JavaScript. Has anyone seen anything like this? Or know how to write it? ...

Find most readable colour of text that is drawn on a coloured surface

I'm not sure how to ask this but here goes. I draw a filled coloured rectangle on screen. The colour is in form of R,G,B I then want to draw text on top of the rectangle, however the colour of the text has to be such that it provides the best contrast, meaning it's readable. Example: If I draw a black rectangle, the obvious colour f...

What is the best way to average two colors that define a linear gradient?

If I have two colors defined by their RGB values, can I average the Red, Green and Blue values and then combine to define a third color that looks like a visual average of the two? ie NewColor = (R1+R2)/2,(G1+G2)/2,(B1+B2)/2 EDIT1: Thanks for all the responses. For my current needs, I am only dealing with color pairs that are shades o...

Colorjack - how do you use it?

Anyone using colorjack? Someone here on SO mentioned it the other day, so I checked it out. It is a really slick tool, but I am having a hard time figuring out how it is used? http://www.colorjack.com/sphere/ I do all web development using asp.net, and my strength is in back-end programming but I'd love to beef up my design skills, an...