Page 1 of 1

Why RGB?

Posted: Sat Aug 13, 2005 6:34 pm
by netmaestro
RGB stands for Red, Green, Blue components of a color you are making. But the colors made this way don't match the colors in the real world. For example, the PB command RGB(255,255,0) makes a bright yellow. Yet if you take some red paint and some green paint and mix them you don't get anything like yellow. More like a brown. But if you mix red and yellow paint you will get green. So my question is, why is it RGB in computing when RYB makes more sense and follows the real world?

Posted: Sat Aug 13, 2005 6:58 pm
by Killswitch
It doesn't work with manufactured colours but with light.

Posted: Sat Aug 13, 2005 7:37 pm
by Fou-Lu
That's true. If you want the real world colors, some programs work with CMYK (cian, magenta, yellow and black) like photoshop, that way you'll get the results you expect. :)

In PureBasic you could do like that:

Code: Select all

Procedure CMY(cian,magenta,yellow) ; or RYB, whatever...
red=255-cian
green=255-magenta
blue=255-yellow
ProcedureReturn (red+green<<8+blue<<16)
EndProcedure
With this you can generate the colors with cian, magenta and yellow components. So, CMY(128,255,0) would give you purple, as you'd expect. Personally I think this is useless... RGB makes more sense, you only need to get used to it. :wink:

Posted: Sat Aug 13, 2005 7:47 pm
by dobro
it is the difference between subtractive synthesis and additive synthesis!


subtractive synthesis
http://www.bway.net/~jscruggs/sub.html

additive synthesis!
http://www.bway.net/~jscruggs/add.html

:D

Posted: Sat Aug 13, 2005 9:44 pm
by Dreglor
yes paint, doesn't use the rgb model but light does

Posted: Sun Aug 14, 2005 8:48 am
by DarkDragon
And why don't we use YUV(Some tools also use this)? :?

Posted: Sun Aug 14, 2005 9:29 am
by thefool
because rgb is the easiest one to understand. And the most correct one in this case, and most low-level as it is light we are mixing. Only few artists would complain.

Posted: Sun Aug 14, 2005 11:52 pm
by Kale
Yep RGB is the primary colours of the visible light spectrum as all colours mixed together create white, whereas all inks mixed together create yukky black. :wink:

http://en.wikipedia.org/wiki/RGB

http://en.wikipedia.org/wiki/CMYK

Posted: Mon Aug 15, 2005 6:50 am
by DarkDragon
Kale wrote:Yep RGB is the primary colours of the visible light spectrum as all colours mixed together create white, whereas all inks mixed together create yukky black. :wink:

http://en.wikipedia.org/wiki/RGB

http://en.wikipedia.org/wiki/CMYK
You have forgotten
http://en.wikipedia.org/wiki/YUV

Posted: Mon Aug 15, 2005 7:29 am
by griz
When you add pigments (paints) together ... they get darker. When you add light ... things get brighter. If you shine a Red, Green and Blue flashlight on a wall, they converge to white.

HSV is another color space that is interesting : http://en.wikipedia.org/wiki/HSV_color_space

Posted: Wed Aug 17, 2005 12:29 am
by MikeB
One very good reason for using RGB is that the image formed on a monitor is composed of Red, Green and Blue. Also as anyone who has dealt with the principles of light and colour as in school physics will know, all colours can be made from the RGB values as these are the primary colours. Cyan, Magenta and Yellow are secondary colours each made from two of the primaries, Cyan = Blue+Green, Magenta = Red+Blue and Yellow = Red+Green. The reason why this does not apply to paint is because of the impurities in the paint, as well as the fact that with paint you are dealing with what is absorbed. Red paint absorbs green and blue, reflecting red, Green paint absorbs Red and Blue and reflects Green. A mixture of the two will absorb pretty well all Blue as both paints absorb it, but also one of the two is absorbing Green and the other is absorbing Red, so you don't get the yellow you would expect but a degraded version which is brown. This is because it is a subtractive process, your monitor however is additive so that Red+Green = pure Yellow as you get both in full added together which is RGB(255,255,0).
Sorry this is a bit long winded but it happens to be a subject I know a lot about as an ex fully qualified professional photograper.

MikeB