HEX to OKLCH: #7008E7

Also known as: Tailwind violet-700

Result

#7008E7 → oklch(0.491 0.270 292.6)

Values are shown at full precision, so converting back gives exactly #7008e7. 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. sRGB → linear

    R: 112/255 = 0.43922 → 0.162029  (((x + 0.055) / 1.055)^2.4)
    G: 8/255 = 0.03137 → 0.002428  (÷ 12.92)
    B: 231/255 = 0.90588 → 0.799103  (((x + 0.055) / 1.055)^2.4)
  2. 2. linear sRGB → LMS

    l = 0.4122·R + 0.5363·G + 0.0514·B = 0.109205
    m = 0.2119·R + 0.6807·G + 0.1074·B = 0.121809
    s = 0.0883·R + 0.2817·G + 0.6300·B = 0.518409
  3. 3. cube root

    l′ = ∛0.109205 = 0.477985
    m′ = ∛0.121809 = 0.495708
    s′ = ∛0.518409 = 0.803324
  4. 4. LMS′ → Oklab

    L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.49073
    a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = 0.10355
    b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = -0.24922
  5. 5. Oklab → OKLCH

    C = √(a² + b²) = 0.26988
    H = atan2(b, a) = 292.563°
    L = 0.49073
  6. 6. OKLCH

    oklch(0.49073 0.26988 292.563)
    rounded: oklch(0.491 0.270 292.6)

All formats

HEX
#7008e7
RGB
rgb(112 8 231)
RGB (legacy)
rgb(112, 8, 231)
HSL
hsl(267.98 93.31% 46.86%) → hsl(268 93% 47%)
HWB
hwb(268 3% 9%)
OKLCH
oklch(0.491 0.270 292.6) · oklch(49.1% 0.270 292.6)
OKLab
oklab(0.491 0.104 -0.249)
Lab (D50)
lab(35.25 67.96 -88.76)
LCH (D50)
lch(35.25 111.79 307.44)
Display P3
color(display-p3 0.4012 0.0841 0.8706)
Linear sRGB
color(srgb-linear 0.1620 0.0024 0.7991)

Gamut: sRGB and Display P3

#7008E7 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.273 and Display P3 reaches 0.281; this color uses 99% of the sRGB chroma available.

CSS snippets

.element {
  color: #7008e7;
  color: rgb(112 8 231);
  color: hsl(268 93% 47%);
  color: oklch(0.491 0.270 292.6);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.491 0.270 292.6);
}
/* arbitrary values */
class="text-[#7008e7] bg-[oklch(0.491_0.270_292.6)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.4012 0.0841 0.8706); }
}

/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #7008e7 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

  • #8031FC · oklch(0.551 0.270 292.6) · ΔL +0.06
  • #6100D2 · oklch(0.431 0.270 292.6) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?