HEX to HSL: #047857
Also known as: Tailwind v3 emerald-700
Result
#047857 → hsl(163 94% 24%)
Values are shown at full precision, so converting back gives exactly #047857. 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. RGB ÷ 255
R = 0.0157 G = 0.4706 B = 0.3412
2. max, min, Δ
max = 0.4706 min = 0.0157 Δ = max − min = 0.4549
3. L
L = (max + min) / 2 = 0.2431 = 24.31%
4. S
S = Δ / (1 − |2L − 1|) = 0.9355 = 93.55%
5. H
max is G → H = 60° × ((B − R) / Δ + 2) = 60° × ((0.3412 − 0.0157) / 0.4549 + 2) = 162.93°
6. HSL
hsl(162.93 93.55% 24.31%)
All formats
- HEX
- #047857
- RGB
- rgb(4 120 87)
- RGB (legacy)
- rgb(4, 120, 87)
- HSL
- hsl(162.93 93.55% 24.31%) → hsl(163 94% 24%)
- HWB
- hwb(163 2% 53%)
- OKLCH
- oklch(0.508 0.105 165.6) · oklch(50.8% 0.105 165.6)
- OKLab
- oklab(0.508 -0.102 0.026)
- Lab (D50)
- lab(44.33 -36.23 9.79)
- LCH (D50)
- lch(44.33 37.52 164.88)
- Display P3
- color(display-p3 0.2039 0.4633 0.3499)
- Linear sRGB
- color(srgb-linear 0.0012 0.1878 0.0953)
Gamut: sRGB and Display P3
#047857 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.106 and Display P3 reaches 0.145; this color uses 99% of the sRGB chroma available.
CSS snippets
.element {
color: #047857;
color: rgb(4 120 87);
color: hsl(163 94% 24%);
color: oklch(0.508 0.105 165.6);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.508 0.105 165.6);
}
/* arbitrary values */
class="text-[#047857] bg-[oklch(0.508_0.105_165.6)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.2039 0.4633 0.3499); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #047857 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- emerald-700#007A55
- teal-700#00786F
- v3 teal-700#0F766E
- v3 green-700#15803D
- green-700#008236
- teal#008080
- seagreen#2E8B57
- v3 green-800#166534
Lighter and darker, same hue and chroma
- #278A68 · oklch(0.568 0.105 165.6) · ΔL +0.06
- #006647 · oklch(0.448 0.105 165.6) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?