#2A5012#2A5012

#2A5012 is a dark, moderate yellow-green. Relative luminance 0.063; OKLCH L 38.9% C 0.100 H 135.8°. Best body text is #FFFFFF at 9.31:1 contrast (WCAG AA passes).

Color values

HEX#2A5012
RGBrgb(42, 80, 18)
HSLhsl(97, 63%, 19%)
HSVhsv(97, 78%, 31%)
CMYKcmyk(47.5%, 0%, 77.5%, 68.6%)
CIE-LABlab(30.09, -25.73, 30.73)
CIE-LCHlch(30.09, 40.08, 129.94°)
OKLaboklab(38.87% -0.0716 0.0696)
OKLCHoklch(38.87% 0.1 135.8)
XYZxyz(3.9326, 6.2730, 1.5757)
Luminance0.0627 (WCAG relative)
Temperaturewarm
Familyyellow-green

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A5012 #381250
analogous
#495012 #2A5012 #125019
triadic
#2A5012 #122A50 #50122A
tetradic
#2A5012 #124950 #381250 #501912
square
#2A5012 #124950 #381250 #501912
split-complementary
#2A5012 #191250 #501249
monochromatic
#0D1906 #101E07 #2A5012 #44821D #5EB428

Accessibility & contrast

On white

9.31
#2A5012 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.25
#2A5012 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A5012
9.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A5012#FFFFFF#000000##FFFFFF
##2A50121.009.312.259.31
#FFFFFF9.311.0021.001.00
#0000002.2521.001.0021.00
##FFFFFF9.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#534908
Deuteranopia (green-blind)
#4E4618
Tritanopia (blue-blind)
#294D44
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #2a5012;
/* rgb */ color: rgb(42, 80, 18);
/* oklch */ color: oklch(38.9% 0.100 135.8);
Tailwind
colors: {
  custom: {
    50: '#688154',
    500: '#2a5012',
    950: '#000000',
  },
}
SCSS
$custom: #2a5012;
$custom-light: #688154;
$custom-dark: #000000;
JSON
{
  "hex": "#2a5012",
  "rgb": {
    "r": 42,
    "g": 80,
    "b": 18
  },
  "hsl": {
    "h": 96.774,
    "s": 63.265,
    "l": 19.216
  },
  "oklch": {
    "l": 0.38872,
    "c": 0.09984,
    "h": 135.8
  },
  "luminance": 0.06273
}

Semantic roles & 50–950 ramp

primary
#2A5012
secondary
#683589
accent
#41E6A7
background
#F6F7F5
surface
#EBEEE8
border
#C6C9C4
text
#060A03
muted
#7A7C78

Preview Lab

Preview with #2A5012

Body copy rendered with the generated semantic roles for this colour.

Preview Lab → · Contrast checker → · Palette generator →

#2A5012 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva