 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
David Dvali Guest
|
Posted: Tue Jul 08, 2003 9:28 am Post subject: TColor |
|
|
How can I make TColor value (color) a more dark?
|
|
| Back to top |
|
 |
Robby Guest
|
Posted: Tue Jul 08, 2003 9:47 am Post subject: Re: TColor |
|
|
This is the ActiveX newgroup. You need to post this somewhere more
applicable like 'borland.public.delphi.vcl.components.using'
"David Dvali" <d_dvali (AT) yahoo (DOT) com> wrote
| Quote: | How can I make TColor value (color) a more dark?
|
|
|
| Back to top |
|
 |
Earl F. Glynn Guest
|
Posted: Wed Jul 09, 2003 4:08 am Post subject: Re: TColor |
|
|
| Quote: | "David Dvali" <d_dvali (AT) yahoo (DOT) com> wrote
How can I make TColor value (color) a more dark?
|
"Robby" <rbooker (AT) synstar (DOT) com> wrote
| Quote: | This is the ActiveX newgroup. You need to post this somewhere more
applicable like 'borland.public.delphi.vcl.components.using'
|
Actually, borland.delphi.graphics would have been a better suggestion, but
I'll just answer your question here.
TColor can have five different formats so I'm not sure how to answer your
question in general. (Sorry, I don't want to cover all five cases <g>).
http://homepages.borland.com/efg2lab/Library/Delphi/Graphics/VCLRTL.htm#TColor
If you're using RGB(red, green, blue), you could try RGB(red-delta,
green-delta, blue-delta) for a slightly darker color -- but make sure the
values are still zero or more after the subtraction.
Alternately, convert RGB to HSV (or some other color space), reduce the "V"
value, and convert HSV' back to R'G'B'. This maintains the same color hue
and saturation.
Look for "Color Spaces, Conversions" here:
http://homepages.borland.com/efg2lab/Library/Delphi/Graphics/Color.htm
--
efg -- Earl F. Glynn, Overland Park, KS USA
efg's Computer Lab: http://www.efg2.com/Lab
Mirror: http://homepages.borland.com/efg2lab/Default.htm
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|