Skip to content

#5151cf

a balanced, vivid blue · cool · closest name: Slate Blue

RGB
81, 81, 207
HSL
240°, 57%, 57%
CMYK
61, 61, 0, 19
Luminance
0.1214

At a glance

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

Hex
#5151cf
Hue
240°
blue
Saturation
57%
vivid
Lightness
57%
balanced
Brightness
81%
HSV value
Perceived
41%
weighted brightness
Luminance
0.1214
WCAG relative
Temperature
Cool
83/100 cool
Color family
Blue
Tone
Vivid
Best ink
White
6.13:1
Closest name
Slate Blue
ΔE2000 4.6
Where it sits
Hue240° of 360°
Saturation57%
Lightness57%
Temperature
Warm ← → Cool83% 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#5151cf
RGBrgb(81, 81, 207)
HSLhsl(240, 57%, 57%)
CMYKcmyk(61%, 61%, 0%, 19%)
LABlab(41.4 37.4 -65.3)
LCHlch(41.4 75.3 299.8)
OKLCHoklch(0.510 0.190 277.3)
Decimal5329359
Display P3color(display-p3 0.318 0.318 0.812)

Copy-ready code

/* CSS */
color: #5151cf;
background-color: #5151cf;
/* Tailwind (arbitrary) */
class="text-[#5151cf] bg-[#5151cf]"
/* SCSS */
$brand: #5151cf;
/* SwiftUI */
Color(red: 0.318, green: 0.318, blue: 0.812)
/* Android */
Color.parseColor("#5151cf")
/* Flutter */
Color(0xFF5151CF)
/* Python / OpenCV (BGR) */
(207, 81, 81)

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 #5151cf · 6.13:1
Use #ffffffAA at every size, AAA for large text only.
Aa
White text · 6.13:1 · recommended
AA pass · AA large pass · AAA fail
Aa
Black text · 3.43:1
AA fail · AA large pass · AAA fail
Reading the other direction: #5151cf as text scores 6.13:1 on white and 3.43:1 on black.

Accessibility — WCAG contrast

Aa
#5151cf on white: 6.13:1
AA ✓ pass · AA-large · AAA
Aa
#5151cf on black: 3.43:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0067D3
deuteranopia · #005CCC
tritanopia · #007088

Color scale — 50 to 950

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

#F4F4FB
#E9E9F6
#CDCDEE
#A7A7E7
#7B7BDB
#5151cf
#3535C0
#2C2CA0
#232380
#1D1D5D
#12123A
Base = 500Lightest = 50 · #F4F4FBDarkest = 950 · #12123A
:root {
  --brand-50: #F4F4FB;
  --brand-100: #E9E9F6;
  --brand-200: #CDCDEE;
  --brand-300: #A7A7E7;
  --brand-400: #7B7BDB;
  --brand-500: #5151cf;
  --brand-600: #3535C0;
  --brand-700: #2C2CA0;
  --brand-800: #232380;
  --brand-900: #1D1D5D;
  --brand-950: #12123A;
  --brand: #5151cf;
  --brand-ink: #ffffff;
}

Colors that work with #5151cf

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#F4F4FA
Tinted page background
Border#C0C0ED
Hairlines and dividers
Muted text#4B4B9B
Captions on the surface
Accent#A48528
Second voice, not a rival
Dark variant#1C1C64
Hover, pressed, headers
Light variant#EBEBF9
Selected rows, tints
Dark surface#141424
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 #5151cf

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
  • Brand accents, badges and data highlights
Use with care
  • Full-page backgrounds — tiring over long sessions
  • 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#CFCF51
Analogous left#5190CF
Analogous right#9051CF
Split-complement 1#CF9051
Split-complement 2#90CF51
Triadic 1#CF5151
Triadic 2#51CF51
Tetradic#CF5190

RGB percentages

Red31.8%
Green31.8%
Blue81.2%

CMYK percentages

Cyan60.9%
Magenta60.9%
Yellow0.0%
Key (black)18.8%

Color previews

#5151cf text on a black background

contrast 3.43:1

Card sample

#5151cf text on a white background

contrast 6.13:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #5151cf;
Background color
Panel with #5151cf background
background-color: #5151cf;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #5151cf;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(81, 81, 207, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(81, 81, 207, 0.45);
Border & gradient
Gradient panel
border: 3px solid #5151cf;
background: linear-gradient(135deg, #5151cf, #A551CF);

Monochromatic scale

Palettes built from #5151cf

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.

#5151cf 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.

#5151cf, answered

What color is #5151cf?

#5151cf is a balanced vivid blue, closest to Slate Blue (ΔE2000 4.6). It sits at 240° on the hue wheel with 57% saturation and 57% lightness, which reads as cool.

What is the RGB value of #5151cf?

rgb(81, 81, 207) — 81 red, 81 green and 207 blue out of 255, or 31.8% / 31.8% / 81.2% by channel.

Is #5151cf a light or a dark color?

It is a dark color. Relative luminance is 0.1214 and perceived brightness is 41%, so white text on it reaches 6.13:1.

Should I use black or white text on #5151cf?

White. It scores 6.13:1 against #5151cf, versus 3.43:1 for black — AA at any size.

What is the complementary color of #5151cf?

#CFCF51 sits directly opposite on the wheel. Softer options are the split-complements #CF9051 and #90CF51, which give the same contrast with far less vibration.

What colors go well with #5151cf?

For interface work: #F4F4FA as the surface, #C0C0ED for borders, #4B4B9B for secondary text, #A48528 as an accent and #1C1C64 for hover and pressed states. For a palette, the analogous pair #5190CF and #9051CF stays calm, while #CFCF51 is the loudest partner.

What is #5151cf in CMYK for printing?

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

Is #5151cf warm or cool?

Cool — it scores 83 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #7F51CF; nudged cooler, #4F74D1.

Work with #5151cf in the Color Lab