OKLCH to HEX: #D8B4FE

Also known as: Tailwind v3 purple-300

Result

oklch(0.82676 0.10823 306.383) → #D8B4FE

Values are shown at full precision, so converting back gives exactly #d8b4fe. The rounded form is what you normally paste into CSS.

Step-by-step math

Every number below is computed from the input, nothing is looked up.

  1. 1. input

    oklch(0.82676 0.10823 306.383)
  2. 2. OKLCH → Oklab

    a = C·cos H = 0.06420
    b = C·sin H = -0.08713
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.833401
    m′ = L − 0.1056·a − 0.0639·b = 0.825547
    s′ = L − 0.0895·a − 1.2915·b = 0.933546
  4. 4. cube

    l = 0.833401³ = 0.578845
    m = 0.825547³ = 0.562633
    s = 0.933546³ = 0.813592
  5. 5. LMS → linear sRGB

    R = 4.0767·l − 3.3077·m + 0.2310·s = 0.686691
    G = −1.2684·l + 2.6098·m − 0.3413·s = 0.456411
    B = −0.0042·l − 0.7034·m + 1.7076·s = 0.991107
  6. 6. linear → sRGB, × 255

    R = 0.84706 × 255 = 216.00 → 216
    G = 0.70588 × 255 = 180.00 → 180
    B = 0.99608 × 255 = 254.00 → 254
  7. 7. RGB → HEX

    #D8B4FE

All formats

HEX
#d8b4fe
RGB
rgb(216 180 254)
RGB (legacy)
rgb(216, 180, 254)
HSL
hsl(269.19 97.37% 85.10%) → hsl(269 97% 85%)
HWB
hwb(269 71% 0%)
OKLCH
oklch(0.827 0.108 306.4) · oklch(82.7% 0.108 306.4)
OKLab
oklab(0.827 0.064 -0.087)
Lab (D50)
lab(78.47 23.68 -31.86)
LCH (D50)
lch(78.47 39.70 306.62)
Display P3
color(display-p3 0.8243 0.7112 0.9764)
Linear sRGB
color(srgb-linear 0.6867 0.4564 0.9911)

Gamut: sRGB and Display P3

#D8B4FE is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.110 and Display P3 reaches 0.121; this color uses 98% of the sRGB chroma available.

CSS snippets

.element {
  color: #d8b4fe;
  color: rgb(216 180 254);
  color: hsl(269 97% 85%);
  color: oklch(0.827 0.108 306.4);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.827 0.108 306.4);
}
/* arbitrary values */
class="text-[#d8b4fe] bg-[oklch(0.827_0.108_306.4)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.8243 0.7112 0.9764); }
}

/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #d8b4fe calc(l - 0.1) c h); }

Nearby colors

Closest colors in the Tailwind and CSS named palettes (OKLab distance).

Lighter and darker, same hue and chroma

  • #ECC7FF · oklch(0.887 0.108 306.4) · ΔL +0.06
  • #C5A1EA · oklch(0.767 0.108 306.4) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?