OKLCH in HEX: #111827

Noto anche come: Tailwind v3 gray-900

Risultato

oklch(0.21008 0.03176 264.665) → #111827

I valori sono mostrati a piena precisione, quindi riconvertendo si ottiene esattamente #111827. La forma arrotondata è quella che di solito incolli nel CSS.

Calcolo passo passo

Ogni numero è calcolato dall’input, nulla viene cercato in tabelle.

  1. 1. input

    oklch(0.21008 0.03176 264.665)
  2. 2. OKLCH → Oklab

    a = C·cos H = -0.00295
    b = C·sin H = -0.03162
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.202085
    m′ = L − 0.1056·a − 0.0639·b = 0.212411
    s′ = L − 0.0895·a − 1.2915·b = 0.251184
  4. 4. cube

    l = 0.202085³ = 0.008253
    m = 0.212411³ = 0.009584
    s = 0.251184³ = 0.015848
  5. 5. LMS → linear sRGB

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

    R = 0.06667 × 255 = 17.00 → 17
    G = 0.09411 × 255 = 24.00 → 24
    B = 0.15293 × 255 = 39.00 → 39
  7. 7. RGB → HEX

    #111827

Tutti i formati

HEX
#111827
RGB
rgb(17 24 39)
RGB (legacy)
rgb(17, 24, 39)
HSL
hsl(220.91 39.29% 10.98%) → hsl(221 39% 11%)
HWB
hwb(221 7% 85%)
OKLCH
oklch(0.210 0.032 264.7) · oklch(21.0% 0.032 264.7)
OKLab
oklab(0.210 -0.003 -0.032)
Lab (D50)
lab(8.15 0.64 -11.47)
LCH (D50)
lch(8.15 11.49 273.21)
Display P3
color(display-p3 0.0722 0.0933 0.1484)
Linear sRGB
color(srgb-linear 0.0056 0.0091 0.0203)

Gamut: sRGB e Display P3

#111827 è un colore esadecimale, quindi sta dentro sRGB e di conseguenza dentro Display P3. A questa luminosità e tonalità sRGB arriva a una croma di 0.145 e Display P3 a 0.145; questo colore usa il 22% della croma sRGB disponibile.

Snippet CSS

.element {
  color: #111827;
  color: rgb(17 24 39);
  color: hsl(221 39% 11%);
  color: oklch(0.210 0.032 264.7);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.210 0.032 264.7);
}
/* arbitrary values */
class="text-[#111827] bg-[oklch(0.210_0.032_264.7)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.0722 0.0933 0.1484); }
}

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

Colori vicini

I colori più vicini nelle palette Tailwind e CSS (distanza OKLab).

Più chiaro e più scuro, stessa tonalità e croma

  • #1F2636 · oklch(0.270 0.032 264.7) · ΔL +0.06
  • #050B19 · oklch(0.150 0.032 264.7) · ΔL −0.06

Apri nello studio

Altri convertitori per questo colore

Tutti i convertitori →