M Schenkel
M Schenkel

Reputation: 6364

Algorithm to adjust color brightness

I am doing a project trying to simulate Google Analytic Map Overlays. Take a look at this link to see what I mean (you need to scroll down to where it says "Here is a geographical country-based visitor volume overview courtesy of Google Analytics"). The Flash mapping tool I have supports Hex Color codes (e.g. color='FFFFCC'). If I am not mistaken this is basically RGB coding?

I am looking for an algorithm where I can computationally create the color codes for a select number of shades of green.

It seems I really want HSV type calculation and not a RGB one.

Upvotes: 2

Views: 1182

Answers (1)

datasage
datasage

Reputation: 19563

I think the easiest way to accomplish this is to select a set of colors and then map then to different segments of your data. I suppose you may need more flexibility.

If you want to calculate color. You can use HSV internally, and then covert it to RGB using this algorithm:

http://www.cs.rit.edu/~ncs/color/t_convert.html

Upvotes: 3

Related Questions