Skip to content

#2af040

a balanced, electric green · cool · closest name: Lime

RGB
42, 240, 64
HSL
127°, 87%, 55%
CMYK
83, 0, 73, 6
Luminance
0.6318

At a glance

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

Hex
#2af040
Hue
127°
green
Saturation
87%
electric
Lightness
55%
balanced
Brightness
94%
HSV value
Perceived
73%
weighted brightness
Luminance
0.6318
WCAG relative
Temperature
Cool
65/100 cool
Color family
Green
Tone
Electric
Best ink
Black
13.64:1
Closest name
Lime
ΔE2000 4.3
Where it sits
Hue127° of 360°
Saturation87%
Lightness55%
Temperature
Warm ← → Cool65% 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#2af040
RGBrgb(42, 240, 64)
HSLhsl(127, 87%, 55%)
CMYKcmyk(83%, 0%, 73%, 6%)
LABlab(83.5 -77.5 67.6)
LCHlch(83.5 102.8 138.9)
OKLCHoklch(0.833 0.259 143.9)
Decimal2814016
Display P3color(display-p3 0.165 0.941 0.251)

Copy-ready code

/* CSS */
color: #2af040;
background-color: #2af040;
/* Tailwind (arbitrary) */
class="text-[#2af040] bg-[#2af040]"
/* SCSS */
$brand: #2af040;
/* SwiftUI */
Color(red: 0.165, green: 0.941, blue: 0.251)
/* Android */
Color.parseColor("#2af040")
/* Flutter */
Color(0xFF2AF040)
/* Python / OpenCV (BGR) */
(64, 240, 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 #2af040 · 13.64:1
Use #000000AAA at every size.
Aa
White text · 1.54:1
AA fail · AA large fail · AAA fail
Aa
Black text · 13.64:1 · recommended
AA pass · AA large pass · AAA pass
Reading the other direction: #2af040 as text scores 1.54:1 on white and 13.64:1 on black.

Accessibility — WCAG contrast

Aa
#2af040 on white: 1.54:1
AA ✗ fail · AA-large · AAA
Aa
#2af040 on black: 13.64:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #F5D91C
deuteranopia · #E0CB53
tritanopia · #00E9CE

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #2af040 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.

#F2FDF3
#E5FAE8
#C4F7CA
#96F8A1
#62F472
#2af040
#10E528
#0DBF21
#0B981B
#0C6E17
#08450F
Base = 500Lightest = 50 · #F2FDF3Darkest = 950 · #08450F
:root {
  --brand-50: #F2FDF3;
  --brand-100: #E5FAE8;
  --brand-200: #C4F7CA;
  --brand-300: #96F8A1;
  --brand-400: #62F472;
  --brand-500: #2af040;
  --brand-600: #10E528;
  --brand-700: #0DBF21;
  --brand-800: #0B981B;
  --brand-900: #0C6E17;
  --brand-950: #08450F;
  --brand: #2af040;
  --brand-ink: #000000;
}

Colors that work with #2af040

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#F4FAF5
Tinted page background
Border#C0EDC5
Hairlines and dividers
Muted text#4B9B54
Captions on the surface
Accent#D826F5
Second voice, not a rival
Dark variant#087715
Hover, pressed, headers
Light variant#E7FDEA
Selected rows, tints
Dark surface#142416
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 #2af040

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#F02ADA
Analogous left#77F02A
Analogous right#2AF0A3
Split-complement 1#A32AF0
Split-complement 2#F02A77
Triadic 1#402AF0
Triadic 2#F0402A
Tetradic#2A77F0

RGB percentages

Red16.5%
Green94.1%
Blue25.1%

CMYK percentages

Cyan82.5%
Magenta0.0%
Yellow73.3%
Key (black)5.9%

Color previews

#2af040 text on a black background

contrast 13.64:1

Card sample

#2af040 text on a white background

contrast 1.54:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #2af040

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.

#2af040 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.

#2af040, answered

What color is #2af040?

#2af040 is a balanced electric green, closest to Lime (ΔE2000 4.3). It sits at 127° on the hue wheel with 87% saturation and 55% lightness, which reads as cool.

What is the RGB value of #2af040?

rgb(42, 240, 64) — 42 red, 240 green and 64 blue out of 255, or 16.5% / 94.1% / 25.1% by channel.

Is #2af040 a light or a dark color?

It is a light color. Relative luminance is 0.6318 and perceived brightness is 73%, so black text on it reaches 13.64:1.

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

Black. It scores 13.64:1 against #2af040, versus 1.54:1 for white — AAA at any size.

What is the complementary color of #2af040?

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

What colors go well with #2af040?

For interface work: #F4FAF5 as the surface, #C0EDC5 for borders, #4B9B54 for secondary text, #D826F5 as an accent and #087715 for hover and pressed states. For a palette, the analogous pair #77F02A and #2AF0A3 stays calm, while #F02ADA is the loudest partner.

What is #2af040 in CMYK for printing?

cmyk(83%, 0%, 73%, 6%). 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 #2af040 warm or cool?

Cool — it scores 65 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #5DF02A; nudged cooler, #28F289.

Work with #2af040 in the Color Lab