rgb color model
The RGB color model builds every color by adding three colored lights — red, green and blue — in varying amounts. It is an additive model: start from black (no light) and add primaries to reach brighter, more colorful results, with all three at full giving white. This mirrors human vision, whose three cone types respond roughly to long, medium and short wavelengths, and it mirrors hardware, since screens emit red, green and blue and camera sensors filter incoming light into the same three bands.
In a digital image, RGB makes each pixel a triple of channel intensities, one number per primary. With 8 bits per channel each value runs 0 to 255, so (255, 0, 0) is pure red, (0, 0, 0) is black, (255, 255, 255) is white and (128, 128, 128) is mid-gray. A color image is therefore three stacked grayscale matrices — the red, green and blue channels — and 8-bit RGB can represent 256^3 ~ 16.7 million distinct colors. Equal values across the three channels always produce a neutral gray, which is the link between color and grayscale.
RGB is the native, default representation for capture, storage and most deep-learning pipelines: CNNs, ViTs, CLIP, detectors like DETR and diffusion image generators all typically operate on RGB tensors. Two cautions keep it honest. First, additive RGB is for emitted light and differs from the subtractive CMY model used in printing, where inks subtract light from white paper. Second, RGB is device-relative — the same triple looks different on different screens unless the space is pinned down (sRGB is the common web standard) — so RGB numbers are only fully meaningful alongside their color space and transfer function.
Yellow in additive RGB is (255, 255, 0): full red plus full green, no blue. This surprises beginners used to paint, where mixing red and green pigment yields a muddy brown — because paint is subtractive, but screens add light.