colors

Generate a specific color for each string?

I have a DataGrid that shows orders that belong to product. I want to have a generated SolidColorBrush that is unique to each product. Update I need these colors to be solid and distinctive, or at least to be ordered in a distinctive way, i.e. there shouldn't be black, blue, green as these 3 colors can be confused with each other. Bes...

Is there a .NET list of 256 colors only?

The Colors class exposes too complicated properties (i.e. beige and other column I don't need). I only want a list of the main colors, or at least the list should be ordered by extremeness, i.e. should first contain the explicit colors like black, white, red, green, blue, then should go to more complex combinations like yello, orange, p...

Application Color schemes

I am working on a new UI for an existing application, currently in VB6, and have been told to make it look better / pretty. Is there anywhere I can get some good ideas around colour schemes for a business application which are not 25 shades of grey? FYI: I am working in WPF. ...

Choosing colors for block diagram's for monochrome printing (grey scale)

At work we use block diagrams, we have to chose colors (4-8 i guess) that would go well with diagram it self and also be nice when printed with monochrome printer. Any ideas? Probably even list of colors that are printed with monochrome printer would be enough and i would just pick a combo myself. Thanks! ...

how to convert a RGB color value to an hexadecimal value in Java?

in my swing application i was able to get the value of JButton color in terms of Red green blue values and i have stored these values in three integers, how to convert RGB values into hexadecimal value. example i need in these format "#0033fA" ...

Color Theory: How to convert Munsell HVC to RGB/HSB/HSL

I'm looking at at document that describes the standard colors used in dentistry to describe the color of a tooth. They quote hue, value, chroma values, indicating they are from the 1905 Munsell description of color: The system of colour notation developed by A. H. Munsell in 1905 identifies colour in terms of three attributes: ...

Color code php inside of css in Dreamweaver

I'm creating a dynamic css stylesheet with php variables in it. I would like to have any code that appears inside the tags color coded as if it was a php file, while everything outside is css color coded. As it is now, everything is color coded for css and the file is .css (I'd like to keep the .css file extension). I'm using Dreamwea...

PHP allocate color without image resource

Can you allocate a color in PHP GD without an image resource? It should be possible because really an allocated color is a number, right? $im = imagecreatetruecolor(100, 100); $col = imagecolorallocate($im, 255, 0, 0); print $col."<br/>"; $col2 = imagecolorallocate($im, 255, 0, 0); print $col2."<br/>"; $im2 = imagecreatetruecolor(600, ...

Linear gradient with IPP functions

I would like to create linear gradient using IPP (Integrated Performance Primitives) functions and avoid pixel-by-pixel color manipulation. In other words, I can't find appropriate function or combination of functions that will alow me to create RGB image with gradient R0 to R1, G0 to G1, B0 to B1 (initial and final RGB values). I can c...

How to generate a set of random colors where no two colors are almost similar?

I currently use the following function to generate a random hexadecimal representation of a color. function getRandomColor($max_r = 192, $max_g = 192, $max_b = 192) { if ($max_r > 192) { $max_r = 192; } if ($max_g > 192) { $max_g = 192; } if ($max_b > 192) { $max_b = 192; } if ($max_r < 0) { $max_r = 0; } if ($max_g ...

What's this numeric notation called?

add(new CustomLabelField ("Please enter your credentials:", Color.WHITE, 0x999966, 0)); What is that 0x999966? I want to place this color there so how can I convert it? I just need an online tool that will convert it for me but I don't even know what it's called! :D link for more info Thanks! Edit: OK, so this is called a hexadecim...

Generating a list of colors, blue through red, 0% through 100%.

I want to create a list of colors, red-yellow-green-blue, and blend into each other across a span of 100. Anyone have experience in this sort of thing? Edit: Well, RGB actually. Any language will do. I just need the algorithm. ...

Is there any way to divide rgb color palette?

I'm trying to generate a color palette which has 16 colors. i will display this palette in 4x4 grid. so i have to find a way to rgb color palette which has 255*255*255 colors divided to 16 colors equally and logically. i think it's gonna be a mathematical algorithm. because i'm tring to pick 16 vectors from 3x3 matrix which picked in e...

Android: Highlighted tab of TabWidget not readable on HTC Sense

In my Android app I use a TabWidget without any special customization. I'd like Android to take care of the specific appearance, which works fine if you compare Android 1.6 with 2.1 for example. By just using a TabWidget the same code leads to different forms of tabs because the SDK defines how to draw it. Here is how it looks on 2.1 for...

Color Space Inversion for constrasting grid

I have a randomly colored background that is split into different but solid colored rectangles. I want to draw a grid over the rectangles(which I can do easy and not the problem). The issue is because of the random colors I cannot hard code the grid color because it may not show up. Another way to think about this is plotting a grid on ...

How to change text color in Disqus comment textarea?

Hello, I'm using Disqus external comment system with Wordpress (as a WP plugin) and I'm trying to customize it with my custom CSS. Everything works great, but I have problems with replacing the default text color in the form textarea. I tried it with: #dsq-content .dsq-textarea .dsq-textarea-wrapper, #dsq-content .dsq-input-wrapper {...

formula for alpha value when blending two transparent colors

hello, lets assume an alpha of 1 means fully opaque and 0 means fully transparent. lets say i have two black images which have 50% transparency (alpha = 0.5). if they are laid on top of each other, the resulting transparency is 0.75, right? if they would have an alpha of 0.25 , the result would be around 0.5, right? if they would ha...

Open office macro function to get a font color.

I am using the BASIC macro language for open office. There is a nice function cell.getValue() that gets the value of the cell. However, I can't find a function that gets the font color of the text in the cell, in numerical RGB format. ...

How to use colours in console output in Scala or Java?

How to use colours in console output in Scala or Java? ...

How to calculate color shadows codes ?

I would like to know / calculate color codes of N red shadows (N can be 5, 20, or 50, for example). How could I do this ? I noticed, for example, that the following gives some red shadows: R = 255, G = B = 0..255 R = 0..255, G = B = 0 Is there any known method to calculate shadows ? ...