Adding Colours (Colors) Together like Paint (Blue + Yellow = Green, etc)
- by glenstorey
I'm making an iOS game using cocos2d libraries.
Lets say you have two objects that have two separate colours - defined in RGB as
Blue: 0,0,255
Yellow: 255,255,0
I want to add blue and yellow to make green.
To over complicate things, let's say that the Blue object is bigger than the Yellow object (for the sake of argument let's say that the ratio is 2:1), I'm adding twice as much blue as yellow - how to I calculate this new (light green) colour correctly.
I understand LAB * Color Space is useful for this sort of 'natural colour' kind of thing, but I'm not sure how to use it - especially in the context of a cocos2d object which (AFAIK) is limited to using RGB in its colour schemes.
I'd really appreciate practical help on how to implement this. Thanks heaps!