Skip to content

#3402ac

a dark, electric violet · cool · closest name: Medium Blue

RGB
52, 2, 172
HSL
258°, 98%, 34%
CMYK
70, 99, 0, 33
Luminance
0.0375

At a glance

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

Hex
#3402ac
Hue
258°
violet
Saturation
98%
electric
Lightness
34%
dark
Brightness
67%
HSV value
Perceived
25%
weighted brightness
Luminance
0.0375
WCAG relative
Temperature
Cool
74/100 cool
Color family
Violet
Tone
Electric
Best ink
White
12.00:1
Closest name
Medium Blue
ΔE2000 4.2
Where it sits
Hue258° of 360°
Saturation98%
Lightness34%
Temperature
Warm ← → Cool74% 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#3402ac
RGBrgb(52, 2, 172)
HSLhsl(258, 98%, 34%)
CMYKcmyk(70%, 99%, 0%, 33%)
LABlab(22.8 59.5 -75.4)
LCHlch(22.8 96.1 308.3)
OKLCHoklch(0.363 0.220 278.8)
Decimal3408556
Display P3color(display-p3 0.204 0.008 0.675)

Copy-ready code

/* CSS */
color: #3402ac;
background-color: #3402ac;
/* Tailwind (arbitrary) */
class="text-[#3402ac] bg-[#3402ac]"
/* SCSS */
$brand: #3402ac;
/* SwiftUI */
Color(red: 0.204, green: 0.008, blue: 0.675)
/* Android */
Color.parseColor("#3402ac")
/* Flutter */
Color(0xFF3402AC)
/* Python / OpenCV (BGR) */
(172, 2, 52)

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

Accessibility — WCAG contrast

Aa
#3402ac on white: 12.00:1
AA ✓ pass · AA-large · AAA
Aa
#3402ac on black: 1.75:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #003CB0
deuteranopia · #0030A9
tritanopia · #004563

Color scale — 50 to 950

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

#F5F1FD
#EBE4FC
#D2C1FB
#B090FE
#8959FD
#6121FC
#4903F2
#3D02CA
#3402ac
#260674
#180449
Base = 800Lightest = 50 · #F5F1FDDarkest = 950 · #180449
:root {
  --brand-50: #F5F1FD;
  --brand-100: #EBE4FC;
  --brand-200: #D2C1FB;
  --brand-300: #B090FE;
  --brand-400: #8959FD;
  --brand-500: #6121FC;
  --brand-600: #4903F2;
  --brand-700: #3D02CA;
  --brand-800: #3402ac;
  --brand-900: #260674;
  --brand-950: #180449;
  --brand: #3402ac;
  --brand-ink: #ffffff;
}

Colors that work with #3402ac

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#CDC0ED
Hairlines and dividers
Muted text#624B9B
Captions on the surface
Accent#C2CC00
Second voice, not a rival
Dark variant#26017E
Hover, pressed, headers
Light variant#EDE6FF
Selected rows, tints
Dark surface#191424
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 #3402ac

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#7AAC02
Analogous left#0225AC
Analogous right#8902AC
Split-complement 1#AC8902
Split-complement 2#25AC02
Triadic 1#AC3402
Triadic 2#02AC34
Tetradic#AC0225

RGB percentages

Red20.4%
Green0.8%
Blue67.5%

CMYK percentages

Cyan69.8%
Magenta98.8%
Yellow0.0%
Key (black)32.5%

Color previews

#3402ac text on a black background

contrast 1.75:1

Card sample

#3402ac text on a white background

contrast 12.00:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(52, 2, 172, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(52, 2, 172, 0.45);
Border & gradient
Gradient panel
border: 3px solid #3402ac;
background: linear-gradient(135deg, #3402ac, #A502AC);

Monochromatic scale

Palettes built from #3402ac

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.

#3402ac 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.

#3402ac, answered

What color is #3402ac?

#3402ac is a dark electric violet, closest to Medium Blue (ΔE2000 4.2). It sits at 258° on the hue wheel with 98% saturation and 34% lightness, which reads as cool.

What is the RGB value of #3402ac?

rgb(52, 2, 172) — 52 red, 2 green and 172 blue out of 255, or 20.4% / 0.8% / 67.5% by channel.

Is #3402ac a light or a dark color?

It is a dark color. Relative luminance is 0.0375 and perceived brightness is 25%, so white text on it reaches 12.00:1.

Should I use black or white text on #3402ac?

White. It scores 12.00:1 against #3402ac, versus 1.75:1 for black — AAA at any size.

What is the complementary color of #3402ac?

#7AAC02 sits directly opposite on the wheel. Softer options are the split-complements #AC8902 and #25AC02, which give the same contrast with far less vibration.

What colors go well with #3402ac?

For interface work: #F6F4FA as the surface, #CDC0ED for borders, #624B9B for secondary text, #C2CC00 as an accent and #26017E for hover and pressed states. For a palette, the analogous pair #0225AC and #8902AC stays calm, while #7AAC02 is the loudest partner.

What is #3402ac in CMYK for printing?

cmyk(70%, 99%, 0%, 33%). 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 #3402ac warm or cool?

Cool — it scores 74 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #7202AC; nudged cooler, #000DAE.

Work with #3402ac in the Color Lab