contrast

Mapping a list of numeric values to colors

I have a list of numeric values. I may normalize the values if needed. I need to transform this list to a list of colors (in HSL, RGB or any other color model I can always do conversion later). For any given value the color must be the same every time. The more different two given numeric values are, the more contrast corresponding v...

How can I choose an image with higher contrast in PHP?

For a thumbnail-engine I would like to develop an algorithm that takes x random thumbnails (crop, no resize) from an image, analyzes them for contrast and chooses the one with the highest contrast. I'm working with PHP and Imagick but I would be glad for some general tips about how to compute contrast of imagery. It seems that many thin...

How (and why) do you use contrasts (in R) ?

I am sorry for asking such a basic question, but I can't seem to put my head around this or find a satisfying answer. I checked ?contrasts and ?C - both lead to "Chapter 2 of Statistical Models in S", which is not readily available to me. Under what cases do you create contrasts (in R) in your analysis? How is it done and what is it us...

How to use JavaScript to measure how bright a users monitor is ?

I've noticed that the brightness of computer monitors drastically varies between computers. As such, this changes the look of web pages greatly. Is there a way to use JavaScript to automatically detect how bright (or dark) a users monitor is so that I can adjust my web page colors accordingly? UPDATE Please note that I do not want ma...

Adjust the contrast of an image in C# efficiently

Is there an efficient way of adjusting the contrast of an image in C#? I've seen this article which advocates doing a per-pixel operation. Not quick. I'm using colour matrices in places already and find them to be quick. Is there a way to adjust contrast using them? (Note: This guy gets it wrong.) I'm also using EmguCV. I notice that ...

how to find the Windows' system font / color when the high contrast mode for accessibility is turned on

hi, When the Windows XP is set to use high contrast mode (i.e the scheme can be set to high contrast black (large)"), the application's font color and size is automatically adjusted. The WebBrowser object I use does not support this so I have to use CSS to manually adjust the font / color size. Is there a way to detect what is th...

How to calculate easy to read color for a random backcolor?

Hi there, in my current tool there is a colored box with some numbers in it. The backcolor of the box is defined by some sort of list but can also be altered by the user. The forecolor (== fontcolor of the numbers) cannot, and i want to make sure that the user can always read the numbers, so i´d like to adjust the forecolor of the numbe...

Silverlight 4.0 - contrast and brightness management

Hi, I am building an image editor for Silverlight 4.0 and need some insight or possibly a snippet of code or library to implement contrast/brightness management. I would appreciate if somebody would share how it can be achieved. Thanks! ...

Brightness and Contrast for a canvas image with javascript

I have an image in a tag var img = new Image(); ctx.drawImage(img,0,0,img.width,img.height); ecc... How is possible to change the Brightness and Contrast of this image with javascript? Tnx ...

How to decide font color in white or black depending on background color?

Hi there I want to show some images like this example The fill color is decided by a field in the data base with the color in hex (ex:ClassX -> Color: #66FFFF). Now, I want to show data above a fill with the selected color (like in the image above) but i need to know if the color is dark or light so i know if the words should be in whi...