HSL to HEX: #228B22
Also known as: CSS forestgreen
Result
hsl(120.00 60.69% 33.92%) → #228B22
Values are shown at full precision, so converting back gives exactly #228b22. 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. input
H = 120.00°, S = 60.69%, L = 33.92%
2. C
C = (1 − |2L − 1|) × S = 0.41172
3. X
X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.00000 (H / 60° = 2.0000, sector 2)
4. m
m = L − C / 2 = 0.13334
5. (R′, G′, B′) + m
(R′, G′, B′) = (0.00000, 0.41172, 0.00000) R = round((0.00000 + 0.13334) × 255) = 34 G = round((0.41172 + 0.13334) × 255) = 139 B = round((0.00000 + 0.13334) × 255) = 34
6. RGB → HEX
#228B22
All formats
- HEX
- #228b22
- RGB
- rgb(34 139 34)
- RGB (legacy)
- rgb(34, 139, 34)
- HSL
- hsl(120.00 60.69% 33.92%) → hsl(120 61% 34%)
- HWB
- hwb(120 13% 45%)
- OKLCH
- oklch(0.558 0.169 142.9) · oklch(55.8% 0.169 142.9)
- OKLab
- oklab(0.558 -0.135 0.102)
- Lab (D50)
- lab(50.64 -45.72 44.03)
- LCH (D50)
- lch(50.64 63.47 136.08)
- Display P3
- color(display-p3 0.2694 0.5372 0.2014)
- Linear sRGB
- color(srgb-linear 0.0160 0.2582 0.0160)
Gamut: sRGB and Display P3
#228B22 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.187 and Display P3 reaches 0.226; this color uses 90% of the sRGB chroma available.
CSS snippets
.element {
color: #228b22;
color: rgb(34 139 34);
color: hsl(120 61% 34%);
color: oklch(0.558 0.169 142.9);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.558 0.169 142.9);
}
/* arbitrary values */
class="text-[#228b22] bg-[oklch(0.558_0.169_142.9)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.2694 0.5372 0.2014); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #228b22 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- green-700#008236
- green#008000
- lime-700#497D00
- v3 green-700#15803D
- v3 lime-700#4D7C0F
- seagreen#2E8B57
- olivedrab#6B8E23
- v3 green-600#16A34A
Lighter and darker, same hue and chroma
- #399E37 · oklch(0.618 0.169 142.9) · ΔL +0.06
- #007904 · oklch(0.498 0.169 142.9) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?