Skip to content

#331c96

a dark, vivid blue · cool · closest name: Dark Blue

RGB
51, 28, 150
HSL
251°, 69%, 35%
CMYK
66, 81, 0, 41
Luminance
0.0374

At a glance

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

Hex
#331c96
Hue
251°
blue
Saturation
69%
vivid
Lightness
35%
dark
Brightness
59%
HSV value
Perceived
24%
weighted brightness
Luminance
0.0374
WCAG relative
Temperature
Cool
77/100 cool
Color family
Blue
Tone
Vivid
Best ink
White
12.02:1
Closest name
Dark Blue
ΔE2000 5.8
Where it sits
Hue251° of 360°
Saturation69%
Lightness35%
Temperature
Warm ← → Cool77% 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#331c96
RGBrgb(51, 28, 150)
HSLhsl(251, 69%, 35%)
CMYKcmyk(66%, 81%, 0%, 41%)
LABlab(22.8 45.2 -62.1)
LCHlch(22.8 76.8 306.1)
OKLCHoklch(0.355 0.182 280.3)
Decimal3349654
Display P3color(display-p3 0.200 0.110 0.588)

Copy-ready code

/* CSS */
color: #331c96;
background-color: #331c96;
/* Tailwind (arbitrary) */
class="text-[#331c96] bg-[#331c96]"
/* SCSS */
$brand: #331c96;
/* SwiftUI */
Color(red: 0.200, green: 0.110, blue: 0.588)
/* Android */
Color.parseColor("#331c96")
/* Flutter */
Color(0xFF331C96)
/* Python / OpenCV (BGR) */
(150, 28, 51)

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 #331c96 · 12.02:1
Use #ffffffAAA at every size.
Aa
White text · 12.02: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: #331c96 as text scores 12.02:1 on white and 1.75:1 on black.

Accessibility — WCAG contrast

Aa
#331c96 on white: 12.02:1
AA ✓ pass · AA-large · AAA
Aa
#331c96 on black: 1.75:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #003B99
deuteranopia · #003294
tritanopia · #004159

Color scale — 50 to 950

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

#F5F3FB
#EBE8F8
#D1CAF2
#AFA0ED
#8771E4
#5F42DC
#4627CE
#3A20AC
#331c96
#251764
#170E3E
Base = 800Lightest = 50 · #F5F3FBDarkest = 950 · #170E3E
:root {
  --brand-50: #F5F3FB;
  --brand-100: #EBE8F8;
  --brand-200: #D1CAF2;
  --brand-300: #AFA0ED;
  --brand-400: #8771E4;
  --brand-500: #5F42DC;
  --brand-600: #4627CE;
  --brand-700: #3A20AC;
  --brand-800: #331c96;
  --brand-900: #251764;
  --brand-950: #170E3E;
  --brand: #331c96;
  --brand-ink: #ffffff;
}

Colors that work with #331c96

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#F5F4FA
Tinted page background
Border#C8C0ED
Hairlines and dividers
Muted text#5A4B9B
Captions on the surface
Accent#B0A71C
Second voice, not a rival
Dark variant#25146B
Hover, pressed, headers
Light variant#EDEAFB
Selected rows, tints
Dark surface#171424
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 #331c96

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#7F961C
Analogous left#1C4296
Analogous right#701C96
Split-complement 1#96701C
Split-complement 2#42961C
Triadic 1#96331C
Triadic 2#1C9633
Tetradic#961C42

RGB percentages

Red20.0%
Green11.0%
Blue58.8%

CMYK percentages

Cyan66.0%
Magenta81.3%
Yellow0.0%
Key (black)41.2%

Color previews

#331c96 text on a black background

contrast 1.75:1

Card sample

#331c96 text on a white background

contrast 12.02:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(51, 28, 150, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(51, 28, 150, 0.45);
Border & gradient
Gradient panel
border: 3px solid #331c96;
background: linear-gradient(135deg, #331c96, #841C96);

Monochromatic scale

Palettes built from #331c96

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.

#331c96 in the real world

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

Industries
TechnologyFinanceHealthcareEnterprise SaaS
Common UI roles
ButtonsLinksFocus statesCharts
Print note

Converts to four-color process without much drama. Proof it anyway.

#331c96, answered

What color is #331c96?

#331c96 is a dark vivid blue, closest to Dark Blue (ΔE2000 5.8). It sits at 251° on the hue wheel with 69% saturation and 35% lightness, which reads as cool.

What is the RGB value of #331c96?

rgb(51, 28, 150) — 51 red, 28 green and 150 blue out of 255, or 20% / 11% / 58.8% by channel.

Is #331c96 a light or a dark color?

It is a dark color. Relative luminance is 0.0374 and perceived brightness is 24%, so white text on it reaches 12.02:1.

Should I use black or white text on #331c96?

White. It scores 12.02:1 against #331c96, versus 1.75:1 for black — AAA at any size.

What is the complementary color of #331c96?

#7F961C sits directly opposite on the wheel. Softer options are the split-complements #96701C and #42961C, which give the same contrast with far less vibration.

What colors go well with #331c96?

For interface work: #F5F4FA as the surface, #C8C0ED for borders, #5A4B9B for secondary text, #B0A71C as an accent and #25146B for hover and pressed states. For a palette, the analogous pair #1C4296 and #701C96 stays calm, while #7F961C is the loudest partner.

What is #331c96 in CMYK for printing?

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

Is #331c96 warm or cool?

Cool — it scores 77 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #601C96; nudged cooler, #1A3198.

Work with #331c96 in the Color Lab