Skip to content

#2afb7f

a balanced, electric green · cool · “Spring Green”

RGB
42, 251, 127
HSL
144°, 96%, 58%
CMYK
83, 0, 49, 2
Luminance
0.7102

At a glance

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

Hex
#2afb7f
Hue
144°
green
Saturation
96%
electric
Lightness
58%
balanced
Brightness
98%
HSV value
Perceived
78%
weighted brightness
Luminance
0.7102
WCAG relative
Temperature
Cool
73/100 cool
Color family
Green
Tone
Electric
Best ink
Black
15.20:1
Closest name
Spring Green
ΔE2000 1
Where it sits
Hue144° of 360°
Saturation96%
Lightness58%
Temperature
Warm ← → Cool73% 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#2afb7f
RGBrgb(42, 251, 127)
HSLhsl(144, 96%, 58%)
CMYKcmyk(83%, 0%, 49%, 2%)
LABlab(87.5 -73.7 45.9)
LCHlch(87.5 86.8 148.1)
OKLCHoklch(0.868 0.227 150.6)
Decimal2816895
Display P3color(display-p3 0.165 0.984 0.498)

Copy-ready code

/* CSS */
color: #2afb7f;
background-color: #2afb7f;
/* Tailwind (arbitrary) */
class="text-[#2afb7f] bg-[#2afb7f]"
/* SCSS */
$brand: #2afb7f;
/* SwiftUI */
Color(red: 0.165, green: 0.984, blue: 0.498)
/* Android */
Color.parseColor("#2afb7f")
/* Flutter */
Color(0xFF2AFB7F)
/* Python / OpenCV (BGR) */
(127, 251, 42)

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#000000 on #2afb7f · 15.20:1
Use #000000AAA at every size.
Aa
White text · 1.38:1
AA fail · AA large fail · AAA fail
Aa
Black text · 15.20:1 · recommended
AA pass · AA large pass · AAA pass
Reading the other direction: #2afb7f as text scores 1.38:1 on white and 15.20:1 on black.

Accessibility — WCAG contrast

Aa
#2afb7f on white: 1.38:1
AA ✗ fail · AA-large · AAA
Aa
#2afb7f on black: 15.20:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #FCE575
deuteranopia · #E6D588
tritanopia · #00F7DE

Color scale — 50 to 950

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

#F1FDF6
#E4FCED
#C1FAD9
#91FDBD
#5AFC9C
#2afb7f
#05F064
#04C854
#03A043
#077333
#044820
Base = 500Lightest = 50 · #F1FDF6Darkest = 950 · #044820
:root {
  --brand-50: #F1FDF6;
  --brand-100: #E4FCED;
  --brand-200: #C1FAD9;
  --brand-300: #91FDBD;
  --brand-400: #5AFC9C;
  --brand-500: #2afb7f;
  --brand-600: #05F064;
  --brand-700: #04C854;
  --brand-800: #03A043;
  --brand-900: #077333;
  --brand-950: #044820;
  --brand: #2afb7f;
  --brand-ink: #000000;
}

Colors that work with #2afb7f

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

Text on it#000000
Black wins here
Surface#F4FAF7
Tinted page background
Border#C0EDD2
Hairlines and dividers
Muted text#4B9B6B
Captions on the surface
Accent#FF26DD
Second voice, not a rival
Dark variant#027D34
Hover, pressed, headers
Light variant#E6FFF0
Selected rows, tints
Dark surface#14241A
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 #2afb7f

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

Works well for
  • Text and icons on dark surfaces
  • Primary buttons and calls to action
  • Focus rings, active and selected states
  • Brand accents, badges and data highlights
Use with care
  • Text of any size on white — fails WCAG AA
  • Full-page backgrounds — tiring over long sessions
  • 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#FB2AA6
Analogous left#3EFB2A
Analogous right#2AFBE8
Split-complement 1#E82AFB
Split-complement 2#FB2A3E
Triadic 1#7F2AFB
Triadic 2#FB7F2A
Tetradic#2A3EFB

RGB percentages

Red16.5%
Green98.4%
Blue49.8%

CMYK percentages

Cyan83.3%
Magenta0.0%
Yellow49.4%
Key (black)1.6%

Color previews

#2afb7f text on a black background

contrast 15.20:1

Card sample

#2afb7f text on a white background

contrast 1.38:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #2afb7f;
Background color
Panel with #2afb7f background
background-color: #2afb7f;
Text shadow — hex

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(42, 251, 127, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(42, 251, 127, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2afb7f;
background: linear-gradient(135deg, #2afb7f, #2AECFB);

Monochromatic scale

Palettes built from #2afb7f

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.

#2afb7f 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

Sits outside most CMYK gamuts — expect a duller press result, or specify a spot ink.

#2afb7f, answered

What color is #2afb7f?

#2afb7f is a balanced electric green — the CSS keyword Spring Green. It sits at 144° on the hue wheel with 96% saturation and 58% lightness, which reads as cool.

What is the RGB value of #2afb7f?

rgb(42, 251, 127) — 42 red, 251 green and 127 blue out of 255, or 16.5% / 98.4% / 49.8% by channel.

Is #2afb7f a light or a dark color?

It is a light color. Relative luminance is 0.7102 and perceived brightness is 78%, so black text on it reaches 15.20:1.

Should I use black or white text on #2afb7f?

Black. It scores 15.20:1 against #2afb7f, versus 1.38:1 for white — AAA at any size.

What is the complementary color of #2afb7f?

#FB2AA6 sits directly opposite on the wheel. Softer options are the split-complements #E82AFB and #FB2A3E, which give the same contrast with far less vibration.

What colors go well with #2afb7f?

For interface work: #F4FAF7 as the surface, #C0EDD2 for borders, #4B9B6B for secondary text, #FF26DD as an accent and #027D34 for hover and pressed states. For a palette, the analogous pair #3EFB2A and #2AFBE8 stays calm, while #FB2AA6 is the loudest partner.

What is #2afb7f in CMYK for printing?

cmyk(83%, 0%, 49%, 2%). This is a screen-to-ink approximation — a color this saturated sits outside most CMYK gamuts and will print duller than it looks here.

Is #2afb7f warm or cool?

Cool — it scores 73 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #2AFB33; nudged cooler, #28FDCD.

Work with #2afb7f in the Color Lab