HSL to HEX: #042F2E

Also known as: Tailwind v3 teal-950

Result

hsl(178.60 84.31% 10.00%) → #042F2E

Values are shown at full precision, so converting back gives exactly #042f2e. 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

    H = 178.60°, S = 84.31%, L = 10.00%
  2. 2. C

    C = (1 − |2L − 1|) × S = 0.16862
  3. 3. X

    X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.16469   (H / 60° = 2.9767, sector 2)
  4. 4. m

    m = L − C / 2 = 0.01569
  5. 5. (R′, G′, B′) + m

    (R′, G′, B′) = (0.00000, 0.16862, 0.16469)
    R = round((0.00000 + 0.01569) × 255) = 4
    G = round((0.16862 + 0.01569) × 255) = 47
    B = round((0.16469 + 0.01569) × 255) = 46
  6. 6. RGB → HEX

    #042F2E

All formats

HEX
#042f2e
RGB
rgb(4 47 46)
RGB (legacy)
rgb(4, 47, 46)
HSL
hsl(178.60 84.31% 10.00%) → hsl(179 84% 10%)
HWB
hwb(179 2% 82%)
OKLCH
oklch(0.277 0.045 192.5) · oklch(27.7% 0.045 192.5)
OKLab
oklab(0.277 -0.044 -0.010)
Lab (D50)
lab(16.65 -14.87 -3.71)
LCH (D50)
lch(16.65 15.32 194.01)
Display P3
color(display-p3 0.0706 0.1811 0.1791)
Linear sRGB
color(srgb-linear 0.0012 0.0284 0.0273)

Gamut: sRGB and Display P3

#042F2E is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.048 and Display P3 reaches 0.064; this color uses 94% of the sRGB chroma available.

CSS snippets

.element {
  color: #042f2e;
  color: rgb(4 47 46);
  color: hsl(179 84% 10%);
  color: oklch(0.277 0.045 192.5);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.277 0.045 192.5);
}
/* arbitrary values */
class="text-[#042f2e] bg-[oklch(0.277_0.045_192.5)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.0706 0.1811 0.1791); }
}

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

  • #173F3D · oklch(0.337 0.045 192.5) · ΔL +0.06
  • #00201F · oklch(0.217 0.045 192.5) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?