Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2008 May : Color intensity algorithym?

www.cryer.info
Managed Newsgroup Archive

Color intensity algorithym?

Subject:Color intensity algorithym?
Posted by:"Paul Dolen" (nospam@nowhere.com)
Date:Thu, 08 May 2008 15:31:00 -0500

I want to shade something light to dark green (or red or blue) based
on the whether a value is high or low.  Well, putting the green to 255
would set the color to a bright green, but from there, to make it
lighter, you have to add red and blue.  So, I'm looking to be able to
take a number from 1 to 100 or 255 or something like that, and have it
output a shade of red or green or blue that ranges from very light red
to very dark red.  Anybody happen to have an algorithm or function to
do that?

Glossary

Replies:

www.cryer.info
Managed Newsgroup Archive