HSL to HEX: #4D7C0F

Also known as: Tailwind v3 lime-700

Result

hsl(85.87 78.42% 27.25%) → #4D7C0F

Values are shown at full precision, so converting back gives exactly #4d7c0f. 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 = 85.87°, S = 78.42%, L = 27.25%
  2. 2. C

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

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

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

    (R′, G′, B′) = (0.24311, 0.42739, 0.00000)
    R = round((0.24311 + 0.05881) × 255) = 77
    G = round((0.42739 + 0.05881) × 255) = 124
    B = round((0.00000 + 0.05881) × 255) = 15
  6. 6. RGB → HEX

    #4D7C0F

All formats

HEX
#4d7c0f
RGB
rgb(77 124 15)
RGB (legacy)
rgb(77, 124, 15)
HSL
hsl(85.87 78.42% 27.25%) → hsl(86 78% 27%)
HWB
hwb(86 6% 51%)
OKLCH
oklch(0.532 0.141 131.6) · oklch(53.2% 0.141 131.6)
OKLab
oklab(0.532 -0.093 0.105)
Lab (D50)
lab(47.14 -29.18 47.35)
LCH (D50)
lch(47.14 55.62 121.65)
Display P3
color(display-p3 0.3438 0.4815 0.1526)
Linear sRGB
color(srgb-linear 0.0742 0.2016 0.0048)

Gamut: sRGB and Display P3

#4D7C0F is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.147 and Display P3 reaches 0.172; this color uses 96% of the sRGB chroma available.

CSS snippets

.element {
  color: #4d7c0f;
  color: rgb(77 124 15);
  color: hsl(86 78% 27%);
  color: oklch(0.532 0.141 131.6);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.532 0.141 131.6);
}
/* arbitrary values */
class="text-[#4d7c0f] bg-[oklch(0.532_0.141_131.6)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.3438 0.4815 0.1526); }
}

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

  • #5E8E29 · oklch(0.592 0.141 131.6) · ΔL +0.06
  • #3C6A00 · oklch(0.472 0.141 131.6) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?