RGB to HEX: #4D7C0F

Also known as: Tailwind v3 lime-700

Result

rgb(77 124 15) → #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. base 10 → base 16

    R = 77 = 4×16 + 13 → 4D
    G = 124 = 7×16 + 12 → 7C
    B = 15 = 0×16 + 15 → 0F
  2. 2. pairs → HEX

    4D 7C 0F → #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?