Skip to content

#331bba

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

RGB
51, 27, 186
HSL
249°, 75%, 42%
CMYK
73, 86, 0, 27
Luminance
0.0503

At a glance

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

Hex
#331bba
Hue
249°
blue
Saturation
75%
vivid
Lightness
42%
dark
Brightness
73%
HSV value
Perceived
28%
weighted brightness
Luminance
0.0503
WCAG relative
Temperature
Cool
78/100 cool
Color family
Blue
Tone
Vivid
Best ink
White
10.47:1
Closest name
Medium Blue
ΔE2000 3.4
Where it sits
Hue249° of 360°
Saturation75%
Lightness42%
Temperature
Warm ← → Cool78% 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#331bba
RGBrgb(51, 27, 186)
HSLhsl(249, 75%, 42%)
CMYKcmyk(73%, 86%, 0%, 27%)
LABlab(26.8 56.2 -77.2)
LCHlch(26.8 95.5 306.1)
OKLCHoklch(0.395 0.224 275.6)
Decimal3349434
Display P3color(display-p3 0.200 0.106 0.729)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#331bba on white: 10.47:1
AA ✓ pass · AA-large · AAA
Aa
#331bba on black: 2.01:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0046BE
deuteranopia · #0038B7
tritanopia · #00506E

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #331bba 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
#E9E7F9
#CFC8F4
#AA9DF1
#7F6CEA
#543BE3
#3B1FD6
#331bba
#27158E
#201367
#140C41
Base = 700Lightest = 50 · #F4F3FCDarkest = 950 · #140C41
:root {
  --brand-50: #F4F3FC;
  --brand-100: #E9E7F9;
  --brand-200: #CFC8F4;
  --brand-300: #AA9DF1;
  --brand-400: #7F6CEA;
  --brand-500: #543BE3;
  --brand-600: #3B1FD6;
  --brand-700: #331bba;
  --brand-800: #27158E;
  --brand-900: #201367;
  --brand-950: #140C41;
  --brand: #331bba;
  --brand-ink: #ffffff;
}

Colors that work with #331bba

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#C7C0ED
Hairlines and dividers
Muted text#574B9B
Captions on the surface
Accent#B6A716
Second voice, not a rival
Dark variant#1F106F
Hover, pressed, headers
Light variant#ECE9FC
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 #331bba

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#A2BA1B
Analogous left#1B52BA
Analogous right#831BBA
Split-complement 1#BA831B
Split-complement 2#52BA1B
Triadic 1#BA331B
Triadic 2#1BBA33
Tetradic#BA1B52

RGB percentages

Red20.0%
Green10.6%
Blue72.9%

CMYK percentages

Cyan72.6%
Magenta85.5%
Yellow0.0%
Key (black)27.1%

Color previews

#331bba text on a black background

contrast 2.01:1

Card sample

#331bba text on a white background

contrast 10.47:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #331bba

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.

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

#331bba, answered

What color is #331bba?

#331bba is a dark vivid blue, closest to Medium Blue (ΔE2000 3.4). It sits at 249° on the hue wheel with 75% saturation and 42% lightness, which reads as cool.

What is the RGB value of #331bba?

rgb(51, 27, 186) — 51 red, 27 green and 186 blue out of 255, or 20% / 10.6% / 72.9% by channel.

Is #331bba a light or a dark color?

It is a dark color. Relative luminance is 0.0503 and perceived brightness is 28%, so white text on it reaches 10.47:1.

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

White. It scores 10.47:1 against #331bba, versus 2.01:1 for black — AAA at any size.

What is the complementary color of #331bba?

#A2BA1B sits directly opposite on the wheel. Softer options are the split-complements #BA831B and #52BA1B, which give the same contrast with far less vibration.

What colors go well with #331bba?

For interface work: #F5F4FA as the surface, #C7C0ED for borders, #574B9B for secondary text, #B6A716 as an accent and #1F106F for hover and pressed states. For a palette, the analogous pair #1B52BA and #831BBA stays calm, while #A2BA1B is the loudest partner.

What is #331bba in CMYK for printing?

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

Is #331bba warm or cool?

Cool — it scores 78 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #6E1BBA; nudged cooler, #193ABC.

Work with #331bba in the Color Lab