colors

What is rgb formula for a gradient going from white to blue?

I want to have a button that has numbers in the range 0 ... 255. I'd like the color of the button to be white when it's zero and blue (RGB = (0,0,255)) when it is 255. How can I accomplish this? At first I tried to make it RGB = (0,0,0) in the beginning, but it will only make it black. How can I accomplish this? ...

Enable bash output color with Lua script

I have several Lua scripts that run experiences and output a lot of information, in text files and in the console. I'd like to add some colors in the console output, to make it more readable. I know that it's possible to color the output of bash scripts using the ANSI escape sequences. For example : $ echo -e "This is red->\e[00;31mRE...

How to set alternate row color in flex datagrid?

Hi, What is the method to set different colors for alternate rows in a flex datagrid? So that two adjacent rows are identified easily? ...

What is the best argorithm for finding the closest color in an array to another color?

I have a color (RGB) being read from a sensor. I also have a list of "known" colors, each paired with a string name. What would the best way (ie behave like a human choosing colors) to pull the name of the nearest color out of this list? I've tried a shortest cartesian distance with RGB, but that makes grey closer to green than to blac...

finding similar colors programatically

I have a buffered image in java and I want to record how similar each pixel is to another based on the color value. so the pixels with 'similar' colors will have a higher similarity value. for example red and pink will have a similarity value 1000 but red and blue will have something like 300 or less. how can I do this. when I get the R...

Designing for mobile phone devices: Recommended Photoshop color mode (scheme)?

I'm building a mobile phone application and have created many mockups in Photoshop CS4. When I convert said mockups into templates on my phone, the colors are lighter then shown in Photoshop and I constantly have to readjust. What color mode or settings should I apply to Photoshop in order to correct this problem as best as possible? ...

How to change Gmap markers color?

Hi! I've a custom google map with different points: Markers[0] = new Array(new GMarker(new GLatLng(45.0, 9.0)), "Location1", "<strong>Address Line</strong><br/>Some information"); Markers[1] = new Array(new GMarker(new GLatLng(45.0, 12.0)), "Location2", "<strong>Address Line</strong><br/>Some information"); etc. Simply I want to chan...

How to change out-of-focus text selection color in Xcode?

Okay, I'll bite. I've got really pleasant code/window colors set up in Xcode. Ordinarily, my selection color is very visible. When I am doing a project search and iterating through the results, however, the results list stays in focus and the found text remains out of focus, using a different background color. This color is extremely h...

RichTextBox specific colors per few characters / lines C#

I have richTextBox1, and here is the contents: line one from my textbox is this, and i want this to be normal, arial, 8 point non-bold font line two, i want everything after the | to be bolded... | this is bold line three: everything in brackets i (want) to be the color (Red) line 4 is "this line is going to be /slanted/ or with ital...

Exporting to Excel the simple way (but not CSV)

Yesterday I found this How-To on exporting data to Excel spreadsheets by simply producing HTML. Seemed like a straightforward way of exporting cells with formatting, what one can not achieve using just CSV format. My idea was to process some data in a Java app, export the results to Excel spreadsheet and make use of Excel's capabilities...

Is it possible to use theme colors in Windows Forms apps?

I normally make use of System Colors whenever possible when designing Windows Forms applications just so that it'll fit in with the user's preferences. But is it possible to use Theme Colors? I realize that this limits you in several ways (must be running Windows that supports it and has the Themes service running), so I would certainl...

Get image color

I want to display images inside divs or tables as backgrounds. If they images aren't large enough, I'm going to need to find the outer most color of that image and apply it to the background of the containing div or table cell. Does anyone have experience with this? In PHP. I'm a noob so please explain. Thank you so much ...

Invert colors on a control

I made a control that uses the OnPaint and base.OnPaint. Now I want that all colors be inverted on certain conditions. But how do I do that? I now how to invert an image, but how do I do with a Graphics object? protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); MyOwnPaint(e); if(Condition) InvertColors(e); }...

Unknown language identification

Hi all! I'm currently working with a dead network application that received packets for a chat. I checked that it received text like this one: hi there! {c:0000FF}foo{/c} sentence I have checked but have not found the language that uses that color syntax. It is some famous language or it's surely a self made script/library? Origina...

Hex colors: Numeric representation for "transparent"?

I am building a web CMS in which the user can choose colours for certain site elements. I would like to convert all colour values to hex to avoid any further formatting hassle ("rgb(x,y,z)" or named colours). I have found a good JS library for that. The only thing that I can't get into hex is "transparent". I need this when explicitly d...

How to mimic Dabble Color Schemes?

How would you develop something similar to what is described in this DabbleDB blog post? ...

What browsers support Alpha channel in colors?

Since I'm always sticking to CSS 2, it was a (pleasant) surprise for me today to find out that CSS 3 supports alpha channels in colors. That allows for a nice range of effects. But - which browsers (and from what version) support this? Is it safe to use this today, or are we better off by still making a 1x1px png image and adding the IE6...

In C# , How can i create a System.Drawing.Color object using a hex value ?

In C# , How can i create a System.Drawing.Color object using a value like this #FFFFF,#FGFG01 etc... ...

Can STDOUT and STDERR use different colors under XTerm / Konsole?

Is it even achievable? We need STDERR (ie. other streams then STDOUT) to have different colo(u)r. For example red. We use bash, terminal should be Konsole (XTerm, gnome terminal or any usable). Thanks if you know :-) ...

Objective C Find closest color (rgb) match

I have a predefined array of rgb values. I want to be able to compare a user defined color to my array and return the closest match in Objective C. Any help is greatly appreciated. ...