Skip to content

#afd42d

a balanced, vivid green · warm · closest name: Yellow Green

RGB
175, 212, 45
HSL
73°, 66%, 50%
CMYK
18, 0, 79, 17
Luminance
0.5639

At a glance

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

Hex
#afd42d
Hue
73°
green
Saturation
66%
vivid
Lightness
50%
balanced
Brightness
83%
HSV value
Perceived
74%
weighted brightness
Luminance
0.5639
WCAG relative
Temperature
Warm
36/100 cool
Color family
Green
Tone
Vivid
Best ink
Black
12.28:1
Closest name
Yellow Green
ΔE2000 3.8
Where it sits
Hue73° of 360°
Saturation66%
Lightness50%
Temperature
Warm ← → Cool36% cool

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

Every format

HEX#afd42d
RGBrgb(175, 212, 45)
HSLhsl(73, 66%, 50%)
CMYKcmyk(18%, 0%, 79%, 17%)
LABlab(79.8 -33.2 71.6)
LCHlch(79.8 78.9 114.8)
OKLCHoklch(0.815 0.185 122.0)
Decimal11523117
Display P3color(display-p3 0.686 0.831 0.176)

Copy-ready code

/* CSS */
color: #afd42d;
background-color: #afd42d;
/* Tailwind (arbitrary) */
class="text-[#afd42d] bg-[#afd42d]"
/* SCSS */
$brand: #afd42d;
/* SwiftUI */
Color(red: 0.686, green: 0.831, blue: 0.176)
/* Android */
Color.parseColor("#afd42d")
/* Flutter */
Color(0xFFAFD42D)
/* Python / OpenCV (BGR) */
(45, 212, 175)

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

Accessibility — WCAG contrast

Aa
#afd42d on white: 1.71:1
AA ✗ fail · AA-large · AAA
Aa
#afd42d on black: 12.28:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #E1C700
deuteranopia · #DCC63E
tritanopia · #B9C9B6

Color scale — 50 to 950

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

#FAFBF3
#F4F8E8
#E9F1CB
#DCECA2
#CAE273
#B8D945
#afd42d
#8BA923
#70871C
#526218
#333D0F
Base = 600Lightest = 50 · #FAFBF3Darkest = 950 · #333D0F
:root {
  --brand-50: #FAFBF3;
  --brand-100: #F4F8E8;
  --brand-200: #E9F1CB;
  --brand-300: #DCECA2;
  --brand-400: #CAE273;
  --brand-500: #B8D945;
  --brand-600: #afd42d;
  --brand-700: #8BA923;
  --brand-800: #70871C;
  --brand-900: #526218;
  --brand-950: #333D0F;
  --brand: #afd42d;
  --brand-ink: #000000;
}

Colors that work with #afd42d

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#F9FAF4
Tinted page background
Border#E3EDC0
Hairlines and dividers
Muted text#899B4B
Captions on the surface
Accent#282DD9
Second voice, not a rival
Dark variant#576A16
Hover, pressed, headers
Light variant#F7FBEA
Selected rows, tints
Dark surface#212414
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 #afd42d

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#522DD4
Analogous left#D4A62D
Analogous right#5CD42D
Split-complement 1#2D5CD4
Split-complement 2#A62DD4
Triadic 1#2DAFD4
Triadic 2#D42DAF
Tetradic#2DD4A6

RGB percentages

Red68.6%
Green83.1%
Blue17.6%

CMYK percentages

Cyan17.5%
Magenta0.0%
Yellow78.8%
Key (black)16.9%

Color previews

#afd42d text on a black background

contrast 12.28:1

Card sample

#afd42d text on a white background

contrast 1.71:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(175, 212, 45, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(175, 212, 45, 0.45);
Border & gradient
Gradient panel
border: 3px solid #afd42d;
background: linear-gradient(135deg, #afd42d, #40D42D);

Monochromatic scale

Palettes built from #afd42d

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.

#afd42d 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.

#afd42d, answered

What color is #afd42d?

#afd42d is a balanced vivid green, closest to Yellow Green (ΔE2000 3.8). It sits at 73° on the hue wheel with 66% saturation and 50% lightness, which reads as warm.

What is the RGB value of #afd42d?

rgb(175, 212, 45) — 175 red, 212 green and 45 blue out of 255, or 68.6% / 83.1% / 17.6% by channel.

Is #afd42d a light or a dark color?

It is a light color. Relative luminance is 0.5639 and perceived brightness is 74%, so black text on it reaches 12.28:1.

Should I use black or white text on #afd42d?

Black. It scores 12.28:1 against #afd42d, versus 1.71:1 for white — AAA at any size.

What is the complementary color of #afd42d?

#522DD4 sits directly opposite on the wheel. Softer options are the split-complements #2D5CD4 and #A62DD4, which give the same contrast with far less vibration.

What colors go well with #afd42d?

For interface work: #F9FAF4 as the surface, #E3EDC0 for borders, #899B4B for secondary text, #282DD9 as an accent and #576A16 for hover and pressed states. For a palette, the analogous pair #D4A62D and #5CD42D stays calm, while #522DD4 is the loudest partner.

What is #afd42d in CMYK for printing?

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

Is #afd42d warm or cool?

Warm — it scores 36 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #D4BC2D; nudged cooler, #71D72B.

Work with #afd42d in the Color Lab