BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mixing CMYK or RGB-Colors

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics)
View previous topic :: View next topic  
Author Message
CyanSky
Guest





PostPosted: Tue Oct 07, 2003 6:06 pm    Post subject: Mixing CMYK or RGB-Colors Reply with 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
Willem Jongman
Guest





PostPosted: Sat Oct 11, 2003 12:51 pm    Post subject: Re: Mixing CMYK or RGB-Colors Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.