Skip to content

#3902a7

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

RGB
57, 2, 167
HSL
260°, 98%, 33%
CMYK
66, 99, 0, 35
Luminance
0.0370

At a glance

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

Hex
#3902a7
Hue
260°
violet
Saturation
98%
electric
Lightness
33%
dark
Brightness
65%
HSV value
Perceived
25%
weighted brightness
Luminance
0.0370
WCAG relative
Temperature
Cool
72/100 cool
Color family
Violet
Tone
Electric
Best ink
White
12.06:1
Closest name
Medium Blue
ΔE2000 4.9
Where it sits
Hue260° of 360°
Saturation98%
Lightness33%
Temperature
Warm ← → Cool72% 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#3902a7
RGBrgb(57, 2, 167)
HSLhsl(260, 98%, 33%)
CMYKcmyk(66%, 99%, 0%, 35%)
LABlab(22.7 58.5 -72.7)
LCHlch(22.7 93.3 308.9)
OKLCHoklch(0.361 0.214 281.9)
Decimal3736231
Display P3color(display-p3 0.224 0.008 0.655)

Copy-ready code

/* CSS */
color: #3902a7;
background-color: #3902a7;
/* Tailwind (arbitrary) */
class="text-[#3902a7] bg-[#3902a7]"
/* SCSS */
$brand: #3902a7;
/* SwiftUI */
Color(red: 0.224, green: 0.008, blue: 0.655)
/* Android */
Color.parseColor("#3902a7")
/* Flutter */
Color(0xFF3902A7)
/* Python / OpenCV (BGR) */
(167, 2, 57)

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

Accessibility — WCAG contrast

Aa
#3902a7 on white: 12.06:1
AA ✓ pass · AA-large · AAA
Aa
#3902a7 on black: 1.74:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #003BAB
deuteranopia · #0031A5
tritanopia · #004260

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #3902a7 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
#ECE4FC
#D4C1FB
#B590FE
#8F59FD
#6A21FC
#5303F2
#4502CA
#3902a7
#2B0674
#1B0449
Base = 800Lightest = 50 · #F5F1FDDarkest = 950 · #1B0449
:root {
  --brand-50: #F5F1FD;
  --brand-100: #ECE4FC;
  --brand-200: #D4C1FB;
  --brand-300: #B590FE;
  --brand-400: #8F59FD;
  --brand-500: #6A21FC;
  --brand-600: #5303F2;
  --brand-700: #4502CA;
  --brand-800: #3902a7;
  --brand-900: #2B0674;
  --brand-950: #1B0449;
  --brand: #3902a7;
  --brand-ink: #ffffff;
}

Colors that work with #3902a7

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#CFC0ED
Hairlines and dividers
Muted text#654B9B
Captions on the surface
Accent#BBCC00
Second voice, not a rival
Dark variant#2B027E
Hover, pressed, headers
Light variant#EEE6FF
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 #3902a7

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#70A702
Analogous left#021DA7
Analogous right#8B02A7
Split-complement 1#A78B02
Split-complement 2#1DA702
Triadic 1#A73902
Triadic 2#02A739
Tetradic#A7021D

RGB percentages

Red22.4%
Green0.8%
Blue65.5%

CMYK percentages

Cyan65.9%
Magenta98.8%
Yellow0.0%
Key (black)34.5%

Color previews

#3902a7 text on a black background

contrast 1.74:1

Card sample

#3902a7 text on a white background

contrast 12.06:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(57, 2, 167, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(57, 2, 167, 0.45);
Border & gradient
Gradient panel
border: 3px solid #3902a7;
background: linear-gradient(135deg, #3902a7, #A702A7);

Monochromatic scale

Palettes built from #3902a7

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.

#3902a7 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.

#3902a7, answered

What color is #3902a7?

#3902a7 is a dark electric violet, closest to Medium Blue (ΔE2000 4.9). It sits at 260° on the hue wheel with 98% saturation and 33% lightness, which reads as cool.

What is the RGB value of #3902a7?

rgb(57, 2, 167) — 57 red, 2 green and 167 blue out of 255, or 22.4% / 0.8% / 65.5% by channel.

Is #3902a7 a light or a dark color?

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

Should I use black or white text on #3902a7?

White. It scores 12.06:1 against #3902a7, versus 1.74:1 for black — AAA at any size.

What is the complementary color of #3902a7?

#70A702 sits directly opposite on the wheel. Softer options are the split-complements #A78B02 and #1DA702, which give the same contrast with far less vibration.

What colors go well with #3902a7?

For interface work: #F6F4FA as the surface, #CFC0ED for borders, #654B9B for secondary text, #BBCC00 as an accent and #2B027E for hover and pressed states. For a palette, the analogous pair #021DA7 and #8B02A7 stays calm, while #70A702 is the loudest partner.

What is #3902a7 in CMYK for printing?

cmyk(66%, 99%, 0%, 35%). 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 #3902a7 warm or cool?

Cool — it scores 72 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #7502A7; nudged cooler, #0006A8.

Work with #3902a7 in the Color Lab