Skip to content

#22017f

a dark, electric violet · cool · closest name: Navy

RGB
34, 1, 127
HSL
256°, 98%, 25%
CMYK
73, 99, 0, 50
Luminance
0.0189

At a glance

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

Hex
#22017f
Hue
256°
violet
Saturation
98%
electric
Lightness
25%
dark
Brightness
50%
HSV value
Perceived
18%
weighted brightness
Luminance
0.0189
WCAG relative
Temperature
Cool
75/100 cool
Color family
Violet
Tone
Electric
Best ink
White
15.23:1
Closest name
Navy
ΔE2000 2.1
Where it sits
Hue256° of 360°
Saturation98%
Lightness25%
Temperature
Warm ← → Cool75% 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#22017f
RGBrgb(34, 1, 127)
HSLhsl(256, 98%, 25%)
CMYKcmyk(73%, 99%, 0%, 50%)
LABlab(14.9 47.6 -60.8)
LCHlch(14.9 77.2 308.1)
OKLCHoklch(0.289 0.177 277.6)
Decimal2228607
Display P3color(display-p3 0.133 0.004 0.498)

Copy-ready code

/* CSS */
color: #22017f;
background-color: #22017f;
/* Tailwind (arbitrary) */
class="text-[#22017f] bg-[#22017f]"
/* SCSS */
$brand: #22017f;
/* SwiftUI */
Color(red: 0.133, green: 0.004, blue: 0.498)
/* Android */
Color.parseColor("#22017f")
/* Flutter */
Color(0xFF22017F)
/* Python / OpenCV (BGR) */
(127, 1, 34)

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

Accessibility — WCAG contrast

Aa
#22017f on white: 15.23:1
AA ✓ pass · AA-large · AAA
Aa
#22017f on black: 1.38:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #002A82
deuteranopia · #00207D
tritanopia · #003148

Color scale — 50 to 950

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

#F4F1FE
#EAE3FC
#D0C1FB
#AD90FE
#8358FE
#5A20FD
#4102F3
#3602CA
#2B01A2
#22017f
#160449
Base = 900Lightest = 50 · #F4F1FEDarkest = 950 · #160449
:root {
  --brand-50: #F4F1FE;
  --brand-100: #EAE3FC;
  --brand-200: #D0C1FB;
  --brand-300: #AD90FE;
  --brand-400: #8358FE;
  --brand-500: #5A20FD;
  --brand-600: #4102F3;
  --brand-700: #3602CA;
  --brand-800: #2B01A2;
  --brand-900: #22017f;
  --brand-950: #160449;
  --brand: #22017f;
  --brand-ink: #ffffff;
}

Colors that work with #22017f

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#F6F4FA
Tinted page background
Border#CCC0ED
Hairlines and dividers
Muted text#604B9B
Captions on the surface
Accent#7F8000
Second voice, not a rival
Dark variant#22017E
Hover, pressed, headers
Light variant#ECE6FF
Selected rows, tints
Dark surface#181424
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 #22017f

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
  • Text on black or near-black surfaces
  • 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#5E7F01
Analogous left#011F7F
Analogous right#61017F
Split-complement 1#7F6101
Split-complement 2#1F7F01
Triadic 1#7F2201
Triadic 2#017F22
Tetradic#7F011F

RGB percentages

Red13.3%
Green0.4%
Blue49.8%

CMYK percentages

Cyan73.2%
Magenta99.2%
Yellow0.0%
Key (black)50.2%

Color previews

#22017f text on a black background

contrast 1.38:1

Card sample

#22017f text on a white background

contrast 15.23:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(34, 1, 127, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(34, 1, 127, 0.45);
Border & gradient
Gradient panel
border: 3px solid #22017f;
background: linear-gradient(135deg, #22017f, #76017F);

Monochromatic scale

Palettes built from #22017f

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.

#22017f in the real world

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

Industries
Creative toolsFintechBeautyLuxury
Common UI roles
ButtonsLinksFocus statesCharts
Print note

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

#22017f, answered

What color is #22017f?

#22017f is a dark electric violet, closest to Navy (ΔE2000 2.1). It sits at 256° on the hue wheel with 98% saturation and 25% lightness, which reads as cool.

What is the RGB value of #22017f?

rgb(34, 1, 127) — 34 red, 1 green and 127 blue out of 255, or 13.3% / 0.4% / 49.8% by channel.

Is #22017f a light or a dark color?

It is a dark color. Relative luminance is 0.0189 and perceived brightness is 18%, so white text on it reaches 15.23:1.

Should I use black or white text on #22017f?

White. It scores 15.23:1 against #22017f, versus 1.38:1 for black — AAA at any size.

What is the complementary color of #22017f?

#5E7F01 sits directly opposite on the wheel. Softer options are the split-complements #7F6101 and #1F7F01, which give the same contrast with far less vibration.

What colors go well with #22017f?

For interface work: #F6F4FA as the surface, #CCC0ED for borders, #604B9B for secondary text, #7F8000 as an accent and #22017E for hover and pressed states. For a palette, the analogous pair #011F7F and #61017F stays calm, while #5E7F01 is the loudest partner.

What is #22017f in CMYK for printing?

cmyk(73%, 99%, 0%, 50%). 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 #22017f warm or cool?

Cool — it scores 75 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #50017F; nudged cooler, #000D80.

Work with #22017f in the Color Lab