mixing colors
Posted: Fri Jul 11, 2014 10:01 pm
Changing the topic a little bit.
How to mix multiple colors in "light" way and "paint" way?
Let say that I have an array of RGB values (0-255 ranges; this comes out of a module):
rrr/ggg/bbb
rrr/ggg/bbb
rrr/ggg/bbb
...
And as the output reslut - I'd like to have one color as if I was mixing lights, and second color as if I was mixing paints.
From what I see - one formula is probably just to sum on all rrr/ggg/bbb channels and divide by amount of elements in the array (subtractive/paint type?). But I don't know how to approach the second one. Especially because many colors in FS are just idealistic with 0 or 255 thresholds.
Trog - I don't seek for ultra-hyper-realistic sRGB, just something brief.
How to mix multiple colors in "light" way and "paint" way?
Let say that I have an array of RGB values (0-255 ranges; this comes out of a module):
rrr/ggg/bbb
rrr/ggg/bbb
rrr/ggg/bbb
...
And as the output reslut - I'd like to have one color as if I was mixing lights, and second color as if I was mixing paints.
From what I see - one formula is probably just to sum on all rrr/ggg/bbb channels and divide by amount of elements in the array (subtractive/paint type?). But I don't know how to approach the second one. Especially because many colors in FS are just idealistic with 0 or 255 thresholds.
Trog - I don't seek for ultra-hyper-realistic sRGB, just something brief.