Skip to content

#5f81df

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

RGB
95, 129, 223
HSL
224°, 67%, 62%
CMYK
57, 42, 0, 13
Luminance
0.2346

At a glance

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

Hex
#5f81df
Hue
224°
blue
Saturation
67%
vivid
Lightness
62%
balanced
Brightness
87%
HSV value
Perceived
53%
weighted brightness
Luminance
0.2346
WCAG relative
Temperature
Cool
92/100 cool
Color family
Blue
Tone
Vivid
Best ink
Black
5.69:1
Closest name
Cornflower Blue
ΔE2000 6.7
Where it sits
Hue224° of 360°
Saturation67%
Lightness62%
Temperature
Warm ← → Cool92% 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#5f81df
RGBrgb(95, 129, 223)
HSLhsl(224, 67%, 62%)
CMYKcmyk(57%, 42%, 0%, 13%)
LABlab(55.5 15.7 -51.7)
LCHlch(55.5 54.0 286.9)
OKLCHoklch(0.622 0.147 267.1)
Decimal6259167
Display P3color(display-p3 0.373 0.506 0.875)

Copy-ready code

/* CSS */
color: #5f81df;
background-color: #5f81df;
/* Tailwind (arbitrary) */
class="text-[#5f81df] bg-[#5f81df]"
/* SCSS */
$brand: #5f81df;
/* SwiftUI */
Color(red: 0.373, green: 0.506, blue: 0.875)
/* Android */
Color.parseColor("#5f81df")
/* Flutter */
Color(0xFF5F81DF)
/* Python / OpenCV (BGR) */
(223, 129, 95)

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

Accessibility — WCAG contrast

Aa
#5f81df on white: 3.69:1
AA ✗ fail · AA-large · AAA
Aa
#5f81df on black: 5.69:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #588BE3
deuteranopia · #4780DD
tritanopia · #0096A5

Color scale — 50 to 950

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

#F3F5FB
#E8ECF8
#CAD5F1
#A1B5EC
#5f81df
#446CDA
#2954CC
#2246AA
#1B3888
#182C63
#0F1B3E
Base = 400Lightest = 50 · #F3F5FBDarkest = 950 · #0F1B3E
:root {
  --brand-50: #F3F5FB;
  --brand-100: #E8ECF8;
  --brand-200: #CAD5F1;
  --brand-300: #A1B5EC;
  --brand-400: #5f81df;
  --brand-500: #446CDA;
  --brand-600: #2954CC;
  --brand-700: #2246AA;
  --brand-800: #1B3888;
  --brand-900: #182C63;
  --brand-950: #0F1B3E;
  --brand: #5f81df;
  --brand-ink: #000000;
}

Colors that work with #5f81df

Not a palette — a role sheet. Each swatch answers one question you will hit while building the component.

Text on it#000000
Black wins here
Surface#F4F6FA
Tinted page background
Border#C0CCED
Hairlines and dividers
Muted text#4B609B
Captions on the surface
Accent#AE641E
Second voice, not a rival
Dark variant#152C6A
Hover, pressed, headers
Light variant#EAEEFB
Selected rows, tints
Dark surface#141824
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 #5f81df

Derived from its contrast, chroma and lightness — not from taste.

Works well for
  • Headings from 24px up on white
  • Text and icons on dark surfaces
  • Primary buttons and calls to action
  • Focus rings, active and selected states
  • Brand accents, badges and data highlights
Use with care
  • Small text on white — under 4.5:1
  • 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#DFBD5F
Analogous left#5FC1DF
Analogous right#7D5FDF
Split-complement 1#DF7D5F
Split-complement 2#C1DF5F
Triadic 1#DF5F81
Triadic 2#81DF5F
Tetradic#DF5FC1

RGB percentages

Red37.3%
Green50.6%
Blue87.5%

CMYK percentages

Cyan57.4%
Magenta42.2%
Yellow0.0%
Key (black)12.5%

Color previews

#5f81df text on a black background

contrast 5.69:1

Card sample

#5f81df text on a white background

contrast 3.69:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #5f81df;
Background color
Panel with #5f81df background
background-color: #5f81df;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #5f81df;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(95, 129, 223, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(95, 129, 223, 0.45);
Border & gradient
Gradient panel
border: 3px solid #5f81df;
background: linear-gradient(135deg, #5f81df, #935FDF);

Monochromatic scale

Palettes built from #5f81df

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.

#5f81df 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.

#5f81df, answered

What color is #5f81df?

#5f81df is a balanced vivid blue, closest to Cornflower Blue (ΔE2000 6.7). It sits at 224° on the hue wheel with 67% saturation and 62% lightness, which reads as cool.

What is the RGB value of #5f81df?

rgb(95, 129, 223) — 95 red, 129 green and 223 blue out of 255, or 37.3% / 50.6% / 87.5% by channel.

Is #5f81df a light or a dark color?

It is a mid-tone. Relative luminance is 0.2346 and perceived brightness is 53%, so black text on it reaches 5.69:1.

Should I use black or white text on #5f81df?

Black. It scores 5.69:1 against #5f81df, versus 3.69:1 for white — AA at any size.

What is the complementary color of #5f81df?

#DFBD5F sits directly opposite on the wheel. Softer options are the split-complements #DF7D5F and #C1DF5F, which give the same contrast with far less vibration.

What colors go well with #5f81df?

For interface work: #F4F6FA as the surface, #C0CCED for borders, #4B609B for secondary text, #AE641E as an accent and #152C6A for hover and pressed states. For a palette, the analogous pair #5FC1DF and #7D5FDF stays calm, while #DFBD5F is the loudest partner.

What is #5f81df in CMYK for printing?

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

Is #5f81df warm or cool?

Cool — it scores 92 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #6C5FDF; nudged cooler, #5D91E1.

Work with #5f81df in the Color Lab