#338D1F#338D1F

#338D1F is a mid, vivid green. Relative luminance 0.199; OKLCH L 56.8% C 0.167 H 140.5°. Best body text is #000000 at 4.97:1 contrast (WCAG AA passes).

Color values

HEX#338D1F
RGBrgb(51, 141, 31)
HSLhsl(109, 64%, 34%)
HSVhsv(109, 78%, 55%)
CMYKcmyk(63.8%, 0%, 78%, 44.7%)
CIE-LABlab(51.67, -47.01, 47.31)
CIE-LCHlch(51.67, 66.69, 134.81°)
OKLaboklab(56.79% -0.1288 0.1061)
OKLCHoklch(56.79% 0.167 140.5)
XYZxyz(11.1369, 19.8514, 4.5409)
Luminance0.1985 (WCAG relative)
Temperatureneutral
Familygreen

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#338D1F #791F8D
analogous
#6A8D1F #338D1F #1F8D42
triadic
#338D1F #1F338D #8D1F33
tetradic
#338D1F #1F6A8D #791F8D #8D421F
square
#338D1F #1F6A8D #791F8D #8D421F
split-complementary
#338D1F #421F8D #8D1F6A
monochromatic
#0F2909 #215B14 #338D1F #45BF2A #67D84E

Accessibility & contrast

On white

4.23
#338D1F on #FFFFFF
AA ✗AA large ✓AAA ✗

On black

4.97
#338D1F on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #338D1F
4.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##338D1F#FFFFFF#000000##000000
##338D1F1.004.234.974.97
#FFFFFF4.231.0021.0021.00
#0000004.9721.001.001.00
##0000004.9721.001.001.00

Color blindness preview

Protanopia (red-blind)
#918005
Deuteranopia (green-blind)
#86782B
Tritanopia (blue-blind)
#258878
Achromatopsia (no color)
#7B7B7B

Design tokens & code

CSS
--color: #338d1f;
/* rgb */ color: rgb(51, 141, 31);
/* oklch */ color: oklch(56.8% 0.167 140.5);
Tailwind
colors: {
  custom: {
    50: '#77af63',
    500: '#338d1f',
    950: '#000000',
  },
}
SCSS
$custom: #338d1f;
$custom-light: #77af63;
$custom-dark: #000000;
JSON
{
  "hex": "#338d1f",
  "rgb": {
    "r": 51,
    "g": 141,
    "b": 31
  },
  "hsl": {
    "h": 109.091,
    "s": 63.953,
    "l": 33.725
  },
  "oklch": {
    "l": 0.56786,
    "c": 0.16683,
    "h": 140.5
  },
  "luminance": 0.19852
}

Semantic roles & 50–950 ramp

primary
#338D1F
secondary
#A74DBB
accent
#41E7C9
background
#F7FAF6
surface
#EEF5EB
border
#C9CFC6
text
#0A1006
muted
#7C7F7A

Preview Lab

Preview with #338D1F

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

Preview Lab → · Contrast checker → · Palette generator →

#338D1F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva