OKLCH in HEX: #DC143C

Noto anche come: CSS crimson

Risultato

oklch(0.57119 0.22194 20.087) → #DC143C

I valori sono mostrati a piena precisione, quindi riconvertendo si ottiene esattamente #dc143c. 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.57119 0.22194 20.087)
  2. 2. OKLCH → Oklab

    a = C·cos H = 0.20844
    b = C·sin H = 0.07622
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.670252
    m′ = L − 0.1056·a − 0.0639·b = 0.544320
    s′ = L − 0.0895·a − 1.2915·b = 0.454095
  4. 4. cube

    l = 0.670252³ = 0.301103
    m = 0.544320³ = 0.161273
    s = 0.454095³ = 0.093635
  5. 5. LMS → linear sRGB

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

    R = 0.86275 × 255 = 220.00 → 220
    G = 0.07842 × 255 = 20.00 → 20
    B = 0.23530 × 255 = 60.00 → 60
  7. 7. RGB → HEX

    #DC143C

Tutti i formati

HEX
#dc143c
RGB
rgb(220 20 60)
RGB (legacy)
rgb(220, 20, 60)
HSL
hsl(348.00 83.33% 47.06%) → hsl(348 83% 47%)
HWB
hwb(348 8% 14%)
OKLCH
oklch(0.571 0.222 20.1) · oklch(57.1% 0.222 20.1)
OKLab
oklab(0.571 0.208 0.076)
Lab (D50)
lab(47.88 71.28 35.48)
LCH (D50)
lch(47.88 79.62 26.46)
Display P3
color(display-p3 0.7917 0.1915 0.2574)
Linear sRGB
color(srgb-linear 0.7157 0.0070 0.0452)

Gamut: sRGB e Display P3

#DC143C è 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.229 e Display P3 a 0.259; questo colore usa il 97% della croma sRGB disponibile.

Snippet CSS

.element {
  color: #dc143c;
  color: rgb(220 20 60);
  color: hsl(348 83% 47%);
  color: oklch(0.571 0.222 20.1);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.571 0.222 20.1);
}
/* arbitrary values */
class="text-[#dc143c] bg-[oklch(0.571_0.222_20.1)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.7917 0.1915 0.2574); }
}

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

  • #F2354D · oklch(0.631 0.222 20.1) · ΔL +0.06
  • #C6002B · oklch(0.511 0.222 20.1) · ΔL −0.06

Apri nello studio

Altri convertitori per questo colore

Tutti i convertitori →