RGB to HEX: #556B2F

Also known as: CSS darkolivegreen

Result

rgb(85 107 47) → #556B2F

Values are shown at full precision, so converting back gives exactly #556b2f. 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. base 10 → base 16

    R = 85 = 5×16 + 5 → 55
    G = 107 = 6×16 + 11 → 6B
    B = 47 = 2×16 + 15 → 2F
  2. 2. pairs → HEX

    55 6B 2F → #556B2F

All formats

HEX
#556b2f
RGB
rgb(85 107 47)
RGB (legacy)
rgb(85, 107, 47)
HSL
hsl(82.00 38.96% 30.20%) → hsl(82 39% 30%)
HWB
hwb(82 18% 58%)
OKLCH
oklch(0.496 0.090 126.2) · oklch(49.6% 0.090 126.2)
OKLab
oklab(0.496 -0.053 0.072)
Lab (D50)
lab(42.36 -16.40 30.32)
LCH (D50)
lch(42.36 34.47 118.41)
Display P3
color(display-p3 0.3506 0.4171 0.2153)
Linear sRGB
color(srgb-linear 0.0908 0.1470 0.0284)

Gamut: sRGB and Display P3

#556B2F is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.126 and Display P3 reaches 0.148; this color uses 71% of the sRGB chroma available.

CSS snippets

.element {
  color: #556b2f;
  color: rgb(85 107 47);
  color: hsl(82 39% 30%);
  color: oklch(0.496 0.090 126.2);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.496 0.090 126.2);
}
/* arbitrary values */
class="text-[#556b2f] bg-[oklch(0.496_0.090_126.2)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.3506 0.4171 0.2153); }
}

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

  • #667D40 · oklch(0.556 0.090 126.2) · ΔL +0.06
  • #455A1D · oklch(0.436 0.090 126.2) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?