#2A7217#2A7217

#2A7217 is a mid, vivid green. Relative luminance 0.126; OKLCH L 48.8% C 0.142 H 140.1°. Best body text is #FFFFFF at 5.97:1 contrast (WCAG AA passes).

Color values

HEX#2A7217
RGBrgb(42, 114, 23)
HSLhsl(107, 66%, 27%)
HSVhsv(107, 80%, 45%)
CMYKcmyk(63.2%, 0%, 79.8%, 55.3%)
CIE-LABlab(42.14, -39.75, 40.75)
CIE-LCHlch(42.14, 56.93, 134.29°)
OKLaboklab(48.81% -0.1091 0.0913)
OKLCHoklch(48.81% 0.142 140.1)
XYZxyz(7.1265, 12.5881, 2.8646)
Luminance0.1259 (WCAG relative)
Temperatureneutral
Familygreen

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A7217 #5F1772
analogous
#587217 #2A7217 #177232
triadic
#2A7217 #172A72 #72172A
tetradic
#2A7217 #175872 #5F1772 #723217
square
#2A7217 #175872 #5F1772 #723217
split-complementary
#2A7217 #321772 #721758
monochromatic
#091905 #173F0D #2A7217 #3DA521 #51D52E

Accessibility & contrast

On white

5.97
#2A7217 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.52
#2A7217 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #2A7217
5.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A7217#FFFFFF#000000##FFFFFF
##2A72171.005.973.525.97
#FFFFFF5.971.0021.001.00
#0000003.5221.001.0021.00
##FFFFFF5.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#756703
Deuteranopia (green-blind)
#6C6121
Tritanopia (blue-blind)
#206E61
Achromatopsia (no color)
#636363

Design tokens & code

CSS
--color: #2a7217;
/* rgb */ color: rgb(42, 114, 23);
/* oklch */ color: oklch(48.8% 0.142 140.1);
Tailwind
colors: {
  custom: {
    50: '#6d9b5c',
    500: '#2a7217',
    950: '#000000',
  },
}
SCSS
$custom: #2a7217;
$custom-light: #6d9b5c;
$custom-dark: #000000;
JSON
{
  "hex": "#2a7217",
  "rgb": {
    "r": 42,
    "g": 114,
    "b": 23
  },
  "hsl": {
    "h": 107.473,
    "s": 66.423,
    "l": 26.863
  },
  "oklch": {
    "l": 0.48806,
    "c": 0.14224,
    "h": 140.1
  },
  "luminance": 0.12589
}

Semantic roles & 50–950 ramp

primary
#2A7217
secondary
#913DA8
accent
#3EE9C6
background
#F7F9F5
surface
#EDF2E9
border
#C8CCC5
text
#080E04
muted
#7B7E79

Preview Lab

Preview with #2A7217

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

Preview Lab → · Contrast checker → · Palette generator →

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