HEX naar HSL: #2B2B22
Ook bekend als: Tailwind olive-800
Resultaat
#2B2B22 → hsl(60 12% 15%)
Waarden staan op volle precisie, dus terugrekenen geeft exact #2b2b22. De afgeronde vorm plak je gewoonlijk in CSS.
Stap-voor-stap berekening
Elk getal wordt uit de invoer berekend, er wordt niets opgezocht.
1. RGB ÷ 255
R = 0.1686 G = 0.1686 B = 0.1333
2. max, min, Δ
max = 0.1686 min = 0.1333 Δ = max − min = 0.0353
3. L
L = (max + min) / 2 = 0.1510 = 15.10%
4. S
S = Δ / (1 − |2L − 1|) = 0.1169 = 11.69%
5. H
max is R → H = 60° × (((G − B) / Δ) mod 6) = 60° × (((0.1686 − 0.1333) / 0.0353) mod 6) = 60.00°
6. HSL
hsl(60.00 11.69% 15.10%)
Alle formaten
- HEX
- #2b2b22
- RGB
- rgb(43 43 34)
- RGB (legacy)
- rgb(43, 43, 34)
- HSL
- hsl(60.00 11.69% 15.10%) → hsl(60 12% 15%)
- HWB
- hwb(60 13% 83%)
- OKLCH
- oklch(0.286 0.016 107.4) · oklch(28.6% 0.016 107.4)
- OKLab
- oklab(0.286 -0.005 0.015)
- Lab (D50)
- lab(17.30 -1.46 5.90)
- LCH (D50)
- lch(17.30 6.08 103.93)
- Display P3
- color(display-p3 0.1686 0.1686 0.1369)
- Linear sRGB
- color(srgb-linear 0.0242 0.0242 0.0160)
Gamut: sRGB en Display P3
#2B2B22 is een hexkleur en ligt dus binnen sRGB en daarmee binnen Display P3. Bij deze helderheid en tint haalt sRGB een chroma van 0.061 en Display P3 van 0.071; deze kleur gebruikt 26% van de beschikbare sRGB-chroma.
CSS-snippets
.element {
color: #2b2b22;
color: rgb(43 43 34);
color: hsl(60 12% 15%);
color: oklch(0.286 0.016 107.4);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.286 0.016 107.4);
}
/* arbitrary values */
class="text-[#2b2b22] bg-[oklch(0.286_0.016_107.4)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.1686 0.1686 0.1369); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #2b2b22 calc(l - 0.1) c h); }Kleuren in de buurt
Dichtstbijzijnde kleuren in de Tailwind- en CSS-paletten (OKLab-afstand).
- stone-800#292524
- neutral-800#262626
- mist-800#22292B
- zinc-800#27272A
- taupe-800#2B2422
- v3 gray-800#1F2937
- mauve-800#2A212C
- v3 teal-950#042F2E
Lichter en donkerder, dezelfde tint en chroma
- #3A3A31 · oklch(0.346 0.016 107.4) · ΔL +0.06
- #1D1D14 · oklch(0.226 0.016 107.4) · ΔL −0.06