HEX to OKLCH: #A3004C

Also known as: Tailwind pink-800

Result

#A3004C → oklch(0.461 0.185 4.1)

Values are shown at full precision, so converting back gives exactly #a3004c. 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: 163/255 = 0.63922 → 0.366253  (((x + 0.055) / 1.055)^2.4)
    G: 0/255 = 0.00000 → 0.000000  (÷ 12.92)
    B: 76/255 = 0.29804 → 0.072272  (((x + 0.055) / 1.055)^2.4)
  2. 2. linear sRGB → LMS

    l = 0.4122·R + 0.5363·G + 0.0514·B = 0.154695
    m = 0.2119·R + 0.6807·G + 0.1074·B = 0.085372
    s = 0.0883·R + 0.2817·G + 0.6300·B = 0.077871
  3. 3. cube root

    l′ = ∛0.154695 = 0.536816
    m′ = ∛0.085372 = 0.440323
    s′ = ∛0.077871 = 0.427030
  4. 4. LMS′ → Oklab

    L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.46068
    a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = 0.18487
    b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = 0.01325
  5. 5. Oklab → OKLCH

    C = √(a² + b²) = 0.18535
    H = atan2(b, a) = 4.099°
    L = 0.46068
  6. 6. OKLCH

    oklch(0.46068 0.18535 4.099)
    rounded: oklch(0.461 0.185 4.1)

All formats

HEX
#a3004c
RGB
rgb(163 0 76)
RGB (legacy)
rgb(163, 0, 76)
HSL
hsl(332.02 100.00% 31.96%) → hsl(332 100% 32%)
HWB
hwb(332 0% 36%)
OKLCH
oklch(0.461 0.185 4.1) · oklch(46.1% 0.185 4.1)
OKLab
oklab(0.461 0.185 0.013)
Lab (D50)
lab(35.18 59.80 6.31)
LCH (D50)
lch(35.18 60.13 6.03)
Display P3
color(display-p3 0.5849 0.1130 0.2976)
Linear sRGB
color(srgb-linear 0.3663 0.0000 0.0723)

Gamut: sRGB and Display P3

#A3004C is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.185 and Display P3 reaches 0.209; this color uses 100% of the sRGB chroma available.

CSS snippets

.element {
  color: #a3004c;
  color: rgb(163 0 76);
  color: hsl(332 100% 32%);
  color: oklch(0.461 0.185 4.1);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.461 0.185 4.1);
}
/* arbitrary values */
class="text-[#a3004c] bg-[oklch(0.461_0.185_4.1)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.5849 0.1130 0.2976); }
}

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

  • #B8245D · oklch(0.521 0.185 4.1) · ΔL +0.06
  • #8E003C · oklch(0.401 0.185 4.1) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?