Skip to content

#331dbd

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

RGB
51, 29, 189
HSL
248°, 73%, 43%
CMYK
73, 85, 0, 26
Luminance
0.0526

At a glance

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

Hex
#331dbd
Hue
248°
blue
Saturation
73%
vivid
Lightness
43%
dark
Brightness
74%
HSV value
Perceived
29%
weighted brightness
Luminance
0.0526
WCAG relative
Temperature
Cool
79/100 cool
Color family
Blue
Tone
Vivid
Best ink
White
10.24:1
Closest name
Medium Blue
ΔE2000 3.5
Where it sits
Hue248° of 360°
Saturation73%
Lightness43%
Temperature
Warm ← → Cool79% 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#331dbd
RGBrgb(51, 29, 189)
HSLhsl(248, 73%, 43%)
CMYKcmyk(73%, 85%, 0%, 26%)
LABlab(27.4 56.3 -77.9)
LCHlch(27.4 96.1 305.8)
OKLCHoklch(0.400 0.226 275.1)
Decimal3349949
Display P3color(display-p3 0.200 0.114 0.741)

Copy-ready code

/* CSS */
color: #331dbd;
background-color: #331dbd;
/* Tailwind (arbitrary) */
class="text-[#331dbd] bg-[#331dbd]"
/* SCSS */
$brand: #331dbd;
/* SwiftUI */
Color(red: 0.200, green: 0.114, blue: 0.741)
/* Android */
Color.parseColor("#331dbd")
/* Flutter */
Color(0xFF331DBD)
/* Python / OpenCV (BGR) */
(189, 29, 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 #331dbd · 10.24:1
Use #ffffffAAA at every size.
Aa
White text · 10.24:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 2.05:1
AA fail · AA large fail · AAA fail
Reading the other direction: #331dbd as text scores 10.24:1 on white and 2.05:1 on black.

Accessibility — WCAG contrast

Aa
#331dbd on white: 10.24:1
AA ✓ pass · AA-large · AAA
Aa
#331dbd on black: 2.05:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0048C1
deuteranopia · #003ABA
tritanopia · #005270

Color scale — 50 to 950

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

#F4F3FC
#E9E7F8
#CEC8F3
#A99EF0
#7E6DE9
#533CE1
#3921D4
#331dbd
#26168D
#1F1467
#140C40
Base = 700Lightest = 50 · #F4F3FCDarkest = 950 · #140C40
:root {
  --brand-50: #F4F3FC;
  --brand-100: #E9E7F8;
  --brand-200: #CEC8F3;
  --brand-300: #A99EF0;
  --brand-400: #7E6DE9;
  --brand-500: #533CE1;
  --brand-600: #3921D4;
  --brand-700: #331dbd;
  --brand-800: #26168D;
  --brand-900: #1F1467;
  --brand-950: #140C40;
  --brand: #331dbd;
  --brand-ink: #ffffff;
}

Colors that work with #331dbd

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#C6C0ED
Hairlines and dividers
Muted text#564B9B
Captions on the surface
Accent#B5A317
Second voice, not a rival
Dark variant#1E116F
Hover, pressed, headers
Light variant#EBE9FC
Selected rows, tints
Dark surface#161424
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 #331dbd

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#A7BD1D
Analogous left#1D57BD
Analogous right#831DBD
Split-complement 1#BD831D
Split-complement 2#57BD1D
Triadic 1#BD331D
Triadic 2#1DBD33
Tetradic#BD1D57

RGB percentages

Red20.0%
Green11.4%
Blue74.1%

CMYK percentages

Cyan73.0%
Magenta84.7%
Yellow0.0%
Key (black)25.9%

Color previews

#331dbd text on a black background

contrast 2.05:1

Card sample

#331dbd text on a white background

contrast 10.24:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(51, 29, 189, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(51, 29, 189, 0.45);
Border & gradient
Gradient panel
border: 3px solid #331dbd;
background: linear-gradient(135deg, #331dbd, #9E1DBD);

Monochromatic scale

Palettes built from #331dbd

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.

#331dbd 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.

#331dbd, answered

What color is #331dbd?

#331dbd is a dark vivid blue, closest to Medium Blue (ΔE2000 3.5). It sits at 248° on the hue wheel with 73% saturation and 43% lightness, which reads as cool.

What is the RGB value of #331dbd?

rgb(51, 29, 189) — 51 red, 29 green and 189 blue out of 255, or 20% / 11.4% / 74.1% by channel.

Is #331dbd a light or a dark color?

It is a dark color. Relative luminance is 0.0526 and perceived brightness is 29%, so white text on it reaches 10.24:1.

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

White. It scores 10.24:1 against #331dbd, versus 2.05:1 for black — AAA at any size.

What is the complementary color of #331dbd?

#A7BD1D sits directly opposite on the wheel. Softer options are the split-complements #BD831D and #57BD1D, which give the same contrast with far less vibration.

What colors go well with #331dbd?

For interface work: #F5F4FA as the surface, #C6C0ED for borders, #564B9B for secondary text, #B5A317 as an accent and #1E116F for hover and pressed states. For a palette, the analogous pair #1D57BD and #831DBD stays calm, while #A7BD1D is the loudest partner.

What is #331dbd in CMYK for printing?

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

Is #331dbd warm or cool?

Cool — it scores 79 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #6E1DBD; nudged cooler, #1B3DBF.

Work with #331dbd in the Color Lab