OKLCH in HEX: #314158

Noto anche come: Tailwind slate-700

Risultato

oklch(0.37173 0.04493 257.424) → #314158

I valori sono mostrati a piena precisione, quindi riconvertendo si ottiene esattamente #314158. 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.37173 0.04493 257.424)
  2. 2. OKLCH → Oklab

    a = C·cos H = -0.00978
    b = C·sin H = -0.04385
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.358389
    m′ = L − 0.1056·a − 0.0639·b = 0.375563
    s′ = L − 0.0895·a − 1.2915·b = 0.429240
  4. 4. cube

    l = 0.358389³ = 0.046033
    m = 0.375563³ = 0.052972
    s = 0.429240³ = 0.079086
  5. 5. LMS → linear sRGB

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

    R = 0.19215 × 255 = 49.00 → 49
    G = 0.25490 × 255 = 65.00 → 65
    B = 0.34511 × 255 = 88.00 → 88
  7. 7. RGB → HEX

    #314158

Tutti i formati

HEX
#314158
RGB
rgb(49 65 88)
RGB (legacy)
rgb(49, 65, 88)
HSL
hsl(215.38 28.47% 26.86%) → hsl(215 28% 27%)
HWB
hwb(215 19% 65%)
OKLCH
oklch(0.372 0.045 257.4) · oklch(37.2% 0.045 257.4)
OKLab
oklab(0.372 -0.010 -0.044)
Lab (D50)
lab(26.92 -1.43 -16.03)
LCH (D50)
lch(26.92 16.09 264.91)
Display P3
color(display-p3 0.2049 0.2531 0.3375)
Linear sRGB
color(srgb-linear 0.0307 0.0529 0.0976)

Gamut: sRGB e Display P3

#314158 è 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.134 e Display P3 a 0.171; questo colore usa il 33% della croma sRGB disponibile.

Snippet CSS

.element {
  color: #314158;
  color: rgb(49 65 88);
  color: hsl(215 28% 27%);
  color: oklch(0.372 0.045 257.4);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.372 0.045 257.4);
}
/* arbitrary values */
class="text-[#314158] bg-[oklch(0.372_0.045_257.4)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.2049 0.2531 0.3375); }
}

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

  • #415169 · oklch(0.432 0.045 257.4) · ΔL +0.06
  • #223147 · oklch(0.312 0.045 257.4) · ΔL −0.06

Apri nello studio

Altri convertitori per questo colore

Tutti i convertitori →