PerfectPalette

Learn Color Theory

Master color with interactive guides.

Accessibility & Implementation

Color Space

A mathematical model that defines how colors are organized, represented, and converted — like sRGB, Display P3, OKLCH, or CIELAB.

What it means

A color space is a specific system for mapping colors to numbers. sRGB maps every color to three values (Red 0-255, Green 0-255, Blue 0-255). OKLCH maps every color to lightness, chroma, and hue. Each space has different strengths: sRGB is universally supported on screens, OKLCH is perceptually uniform, Display P3 covers a wider gamut, and CIELAB is the basis for most color science research.

Different color spaces can represent the same color with different numbers. The blue #2563EB in sRGB becomes approximately oklch(0.55 0.22 260) in OKLCH — same visual color, different numeric representation in each space's coordinate system.

Why it matters in palette design

Choosing the right color space determines how predictable your palette operations are. If you interpolate between two colors in HSL, the midpoint may look wrong (the "gray dead zone" problem). In OKLCH, interpolation produces perceptually even results. PerfectPalette uses OKLCH internally for scale generation and scoring, but accepts and exports colors in multiple spaces.

Common confusion

Color space vs. gamut: A color space is the mathematical model (the coordinate system). A gamut is the range of colors a specific space or device can reproduce. OKLCH can describe colors outside any display gamut — it's a specification space, not a hardware limitation. sRGB is both a color space (the math) and a gamut (the displayable range).

Example

PerfectPalette's Color Modes article lets you convert the same color between 8 color spaces side by side. A saturated teal shows dramatically different numbers in each — RGB (38, 166, 154), HSL (172°, 63%, 40%), OKLCH (0.64, 0.12, 176°) — but they all describe the same visual color.

Learn more

Apply this to your palette

Open PerfectPalette and put these concepts into practice with your own colors.