OKLCH to HEX: #052F4A

Also known as: Tailwind sky-950

Result

oklch(0.29319 0.06580 242.909) → #052F4A

Values are shown at full precision, so converting back gives exactly #052f4a. 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.29319 0.06580 242.909)
  2. 2. OKLCH → Oklab

    a = C·cos H = -0.02997
    b = C·sin H = -0.05858
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.268672
    m′ = L − 0.1056·a − 0.0639·b = 0.300094
    s′ = L − 0.0895·a − 1.2915·b = 0.371528
  4. 4. cube

    l = 0.268672³ = 0.019394
    m = 0.300094³ = 0.027025
    s = 0.371528³ = 0.051283
  5. 5. LMS → linear sRGB

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

    R = 0.01960 × 255 = 5.00 → 5
    G = 0.18431 × 255 = 47.00 → 47
    B = 0.29020 × 255 = 74.00 → 74
  7. 7. RGB → HEX

    #052F4A

All formats

HEX
#052f4a
RGB
rgb(5 47 74)
RGB (legacy)
rgb(5, 47, 74)
HSL
hsl(203.48 87.34% 15.49%) → hsl(203 87% 15%)
HWB
hwb(203 2% 71%)
OKLCH
oklch(0.293 0.066 242.9) · oklch(29.3% 0.066 242.9)
OKLab
oklab(0.293 -0.030 -0.059)
Lab (D50)
lab(17.86 -5.41 -21.05)
LCH (D50)
lch(17.86 21.74 255.57)
Display P3
color(display-p3 0.0727 0.1812 0.2816)
Linear sRGB
color(srgb-linear 0.0015 0.0284 0.0685)

Gamut: sRGB and Display P3

#052F4A is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.071 and Display P3 reaches 0.092; this color uses 93% of the sRGB chroma available.

CSS snippets

.element {
  color: #052f4a;
  color: rgb(5 47 74);
  color: hsl(203 87% 15%);
  color: oklch(0.293 0.066 242.9);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.293 0.066 242.9);
}
/* arbitrary values */
class="text-[#052f4a] bg-[oklch(0.293_0.066_242.9)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.0727 0.1812 0.2816); }
}

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

  • #183F5B · oklch(0.353 0.066 242.9) · ΔL +0.06
  • #00203A · oklch(0.233 0.066 242.9) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?