Mix RGB colors (L*a*b*)
Posted
by Samuel
on Stack Overflow
See other posts from Stack Overflow
or by Samuel
Published on 2010-05-05T07:42:09Z
Indexed on
2010/05/05
7:48 UTC
Read the original article
Hit count: 429
Hello!
Basically I want two mix two colours color1
and color2
.
Since simple calculation's bring up stuff like blue+yellow = grey ((color1.r + color2.r)/2
etc) i did some research and found that apparently mixing colors in order for the mixed color to look like we expect it too (e.g. blue+yellow = green) isn't that straight forward.
What another stackoverflow post taught me was that in order two achieve the mixture correctly i'd have to use the L*a*b* space / CIELAB and linked to the wikipedia page about this topic.
I found it informative but i couldn't really understand how to convert RGB to (sRGB and than to) L*a*b* - how to mix the obtained colors and how to convert back
I hope somebody here can help me
Thanks,
Samuel
© Stack Overflow or respective owner