Skip to content

#1a7f21

a dark, vivid green · cool · closest name: Green

RGB
26, 127, 33
HSL
124°, 66%, 30%
CMYK
80, 0, 74, 50
Luminance
0.1551

At a glance

Every number on this page in one read: what #1a7f21 is made of, how bright it looks, and which way it leans.

Hex
#1a7f21
Hue
124°
green
Saturation
66%
vivid
Lightness
30%
dark
Brightness
50%
HSV value
Perceived
39%
weighted brightness
Luminance
0.1551
WCAG relative
Temperature
Cool
64/100 cool
Color family
Green
Tone
Vivid
Best ink
White
5.12:1
Closest name
Green
ΔE2000 2.8
Where it sits
Hue124° of 360°
Saturation66%
Lightness30%
Temperature
Warm ← → Cool64% cool

Reads cool. Warm and cool siblings keep the same lightness, so you can swap one in without redoing your contrast maths.

Every format

HEX#1a7f21
RGBrgb(26, 127, 33)
HSLhsl(124, 66%, 30%)
CMYKcmyk(80%, 0%, 74%, 50%)
LABlab(46.3 -46.9 41.0)
LCHlch(46.3 62.3 138.8)
OKLCHoklch(0.522 0.158 143.7)
Decimal1736481
Display P3color(display-p3 0.102 0.498 0.129)

Copy-ready code

/* CSS */
color: #1a7f21;
background-color: #1a7f21;
/* Tailwind (arbitrary) */
class="text-[#1a7f21] bg-[#1a7f21]"
/* SCSS */
$brand: #1a7f21;
/* SwiftUI */
Color(red: 0.102, green: 0.498, blue: 0.129)
/* Android */
Color.parseColor("#1a7f21")
/* Flutter */
Color(0xFF1A7F21)
/* Python / OpenCV (BGR) */
(33, 127, 26)

Best text color

Only one of black and white can be right. This is the one, with the number that proves it.

Readable at a glance#ffffff on #1a7f21 · 5.12:1
Use #ffffffAA at every size, AAA for large text only.
Aa
White text · 5.12:1 · recommended
AA pass · AA large pass · AAA fail
Aa
Black text · 4.10:1
AA fail · AA large pass · AAA fail
Reading the other direction: #1a7f21 as text scores 5.12:1 on white and 4.10:1 on black.

Accessibility — WCAG contrast

Aa
#1a7f21 on white: 5.12:1
AA ✓ pass · AA-large · AAA
Aa
#1a7f21 on black: 4.10:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #827211
deuteranopia · #776B2B
tritanopia · #007B6C

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #1a7f21 is pinned to step 800; the rest hold its hue and let saturation ease off at the extremes so the pale end never turns neon.

#F3FBF4
#E8F8E9
#CBF1CD
#A2ECA7
#73E27B
#45D94F
#2ACB35
#23A92C
#1a7f21
#18621D
#0F3D12
Base = 800Lightest = 50 · #F3FBF4Darkest = 950 · #0F3D12
:root {
  --brand-50: #F3FBF4;
  --brand-100: #E8F8E9;
  --brand-200: #CBF1CD;
  --brand-300: #A2ECA7;
  --brand-400: #73E27B;
  --brand-500: #45D94F;
  --brand-600: #2ACB35;
  --brand-700: #23A92C;
  --brand-800: #1a7f21;
  --brand-900: #18621D;
  --brand-950: #0F3D12;
  --brand: #1a7f21;
  --brand-ink: #ffffff;
}

Colors that work with #1a7f21

Not a palette — a role sheet. Each swatch answers one question you will hit while building the component.

Text on it#ffffff
White wins here
Surface#F4FAF5
Tinted page background
Border#C0EDC3
Hairlines and dividers
Muted text#4B9B50
Captions on the surface
Accent#6F1782
Second voice, not a rival
Dark variant#166A1C
Hover, pressed, headers
Light variant#EAFBEB
Selected rows, tints
Dark surface#142415
Dark-mode background
Light mode
Everything in its place

Surface, border, heading and body all derive from this one hue, so the screen stays coherent without a second palette.

Primary actionSecondaryBadge
Dark mode
Same hue, inverted

Lightness flips, hue holds. The accent stays the anchor in both themes.

Primary actionSecondaryAccent

How to use #1a7f21

Derived from its contrast, chroma and lightness — not from taste.

Works well for
  • Body text and links on white
  • Primary buttons and calls to action
  • Focus rings, active and selected states
  • Headers, footers and dark-mode surfaces
  • Brand accents, badges and data highlights
Use with care
  • Full-page backgrounds — tiring over long sessions
  • Black text placed on it
  • Pairing with a same-lightness hue — edges vibrate

Similar colors

One move away from this hex in each direction. Every swatch is its own page.

Color relationships

The wheel positions with their names attached, so you can grab the one you actually need.

Complementary#7F1A78
Analogous left#457F1A
Analogous right#1A7F54
Split-complement 1#541A7F
Split-complement 2#7F1A45
Triadic 1#211A7F
Triadic 2#7F211A
Tetradic#1A457F

RGB percentages

Red10.2%
Green49.8%
Blue12.9%

CMYK percentages

Cyan79.5%
Magenta0.0%
Yellow74.0%
Key (black)50.2%

Color previews

#1a7f21 text on a black background

contrast 4.10:1

Card sample

#1a7f21 text on a white background

contrast 5.12:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #1a7f21;
Background color
Panel with #1a7f21 background
background-color: #1a7f21;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #1a7f21;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(26, 127, 33, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(26, 127, 33, 0.45);
Border & gradient
Gradient panel
border: 3px solid #1a7f21;
background: linear-gradient(135deg, #1a7f21, #1A7F64);

Monochromatic scale

Palettes built from #1a7f21

Shades — darker

Tints — lighter

Color harmonies

Nearest named colors

Ranked with CIEDE2000 across all 139 CSS keywords. Under ΔE 2 the eye stops telling them apart; over ΔE 10 they are plainly different colors.

#1a7f21 in the real world

Where a color in this family tends to land, and the interface roles it is usually asked to play.

Industries
SustainabilityFinanceHealth and wellnessAgriculture
Common UI roles
ButtonsLinksFocus statesCharts
Print note

Converts to four-color process without much drama. Proof it anyway.

#1a7f21, answered

What color is #1a7f21?

#1a7f21 is a dark vivid green, closest to Green (ΔE2000 2.8). It sits at 124° on the hue wheel with 66% saturation and 30% lightness, which reads as cool.

What is the RGB value of #1a7f21?

rgb(26, 127, 33) — 26 red, 127 green and 33 blue out of 255, or 10.2% / 49.8% / 12.9% by channel.

Is #1a7f21 a light or a dark color?

It is a dark color. Relative luminance is 0.1551 and perceived brightness is 39%, so white text on it reaches 5.12:1.

Should I use black or white text on #1a7f21?

White. It scores 5.12:1 against #1a7f21, versus 4.10:1 for black — AA at any size.

What is the complementary color of #1a7f21?

#7F1A78 sits directly opposite on the wheel. Softer options are the split-complements #541A7F and #7F1A45, which give the same contrast with far less vibration.

What colors go well with #1a7f21?

For interface work: #F4FAF5 as the surface, #C0EDC3 for borders, #4B9B50 for secondary text, #6F1782 as an accent and #166A1C for hover and pressed states. For a palette, the analogous pair #457F1A and #1A7F54 stays calm, while #7F1A78 is the loudest partner.

What is #1a7f21 in CMYK for printing?

cmyk(80%, 0%, 74%, 50%). This is a screen-to-ink approximation — ask your printer for a proof before committing to a run.

Is #1a7f21 warm or cool?

Cool — it scores 64 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #387F1A; nudged cooler, #188146.

Work with #1a7f21 in the Color Lab