What is RGB?
A color model that represents colors as additive combinations of red, green, and blue light, used by every digital screen.
Also known as: Red Green Blue
RGB describes a color by how much red, green, and blue light to mix. In CSS: rgb(37 99 235) or rgb(37, 99, 235). Each channel is 0-255 (8 bits) by default; CSS now also accepts percentages and float values for higher-precision color spaces. Add an alpha channel and you have RGBA: rgb(37 99 235 / 0.5) for 50% opacity.
RGB is additive (more light = brighter, all three at maximum = white) which matches how screens emit light. Print uses CMYK, which is subtractive. Converting between the two is lossy: RGB can produce vivid colors that fall outside the CMYK gamut, and CMYK can produce some dark colors RGB cannot reproduce. Brand kits typically declare both versions of the primary color with explicit values for each.
For programmatic color work, RGB is the universal lingua franca: every image format, every screen, every drawing API speaks it. For perceptual work (gradients that look smooth, accessible contrast ratios), HSL or OKLCH are better, with RGB as the final output stage.
In the wild
rgb(255, 0, 0)for pure red on a screen- A Sketch palette exporting brand colors as both hex and RGB so engineers can paste either
- An accessibility check converting RGB to relative luminance to compute contrast ratio against text