 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
CyanSky Guest
|
Posted: Tue Oct 07, 2003 6:06 pm Post subject: Mixing CMYK or RGB-Colors |
|
|
Hello,
i am looking for an algorithm to mix two CMYK-Colors.
Thats why, when i mix to RGB-Colors, i get not the real mixed Color
like in Paintings.
Example: mixing red and green gives yellow, not brown, like on
paintings.
For that i heared about, that the CMYK-Colors are better for
real-color mixing. But when i See the CMYK-Parts of red and green and
brown, i can't find a pattern or an algorithm to calculate with them.
Can anybody help me?
Regards
CyanSky
|
|
| Back to top |
|
 |
Willem Jongman Guest
|
Posted: Sat Oct 11, 2003 12:51 pm Post subject: Re: Mixing CMYK or RGB-Colors |
|
|
Hi,
RGB and CMYK are hardware-oriented color models,
aimed at CRT's resp. printers.
What you need is a color model that is oriented
to human perception, one of these is HSV (hue,
saturation, value).
Convert your two RGB colors to HSV, than just
average them:
H3 = (H1 + H2) / 2;
S3 = (S1 + S2) / 2;
V3 = (V1 + V2) / 2;
Convert the result back to RGB et voila.
The algorithms for doing the conversions are easy to
find on the web,
http://homepages.borland.com/efg2lab/Library/Delphi/Graphics/Color.htm
might be a good start, or google for rgb2hsv and hsv2rgb.
Good luck,
Willem.
CyanSky wrote:
| Quote: |
Hello,
i am looking for an algorithm to mix two CMYK-Colors.
Thats why, when i mix to RGB-Colors, i get not the real mixed Color
like in Paintings.
Example: mixing red and green gives yellow, not brown, like on
paintings.
For that i heared about, that the CMYK-Colors are better for
real-color mixing. But when i See the CMYK-Parts of red and green and
brown, i can't find a pattern or an algorithm to calculate with them.
Can anybody help me?
Regards
CyanSky
|
|
|
| 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
|
|