RGB: Red Green Blue Additive CSS Color

Additive channel model mixing Red, Green, and Blue primaries from 0 to 255 or 0% to 100%, with modern space-separated CSS Color 4 syntax.

Extension / Token.css / .json
MIME / Media typetext/css
Gamut scopesRGB (Standard Web)
Human readabilityMedium
Perceptual uniformityNo
Alpha channel supportYes
Best forPixel buffers, Canvas 2D shaders, and programmatic alpha opacity blending
RGB
CSS / .JSON
rgb(37 99 235 / 0.85)

Strengths

  • Maps 1:1 to browser Canvas 2D Uint8ClampedArray pixels and display subpixels.
  • Modern CSS Color 4 merges rgb() and rgba() into space-separated slash syntax.
  • Easy numeric channel clamping (0–255 or floating 0–1).

Trade-offs

  • Linear interpolation inside gamma sRGB desaturates complementary gradients through gray.
  • Hard to predict perceptual lightness or WCAG contrast from raw R/G/B integers.

Convert & inspect RGB locally

Related color engineering guides

RGB frequently asked questions

Is rgba() deprecated in modern CSS?

rgb() and rgba() are now aliases in CSS Color 4 — prefer space-separated rgb(37 99 235 / 50%) for clean modern stylesheets.

Why convert RGB to linear RGB or OKLab before blending?

Gamma-encoded sRGB bends light curves non-linearly; converting through linear light or OKLab eliminates muddy dark bands.