Skip to content

#5f7fec

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

RGB
95, 127, 236
HSL
226°, 79%, 65%
CMYK
60, 46, 0, 8
Luminance
0.2367

At a glance

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

Hex
#5f7fec
Hue
226°
blue
Saturation
79%
electric
Lightness
65%
balanced
Brightness
93%
HSV value
Perceived
53%
weighted brightness
Luminance
0.2367
WCAG relative
Temperature
Cool
91/100 cool
Color family
Blue
Tone
Electric
Best ink
Black
5.73:1
Closest name
Cornflower Blue
ΔE2000 7.2
Where it sits
Hue226° of 360°
Saturation79%
Lightness65%
Temperature
Warm ← → Cool91% 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#5f7fec
RGBrgb(95, 127, 236)
HSLhsl(226, 79%, 65%)
CMYKcmyk(60%, 46%, 0%, 8%)
LABlab(55.8 21.2 -58.6)
LCHlch(55.8 62.3 289.9)
OKLCHoklch(0.626 0.167 268.9)
Decimal6258668
Display P3color(display-p3 0.373 0.498 0.925)

Copy-ready code

/* CSS */
color: #5f7fec;
background-color: #5f7fec;
/* Tailwind (arbitrary) */
class="text-[#5f7fec] bg-[#5f7fec]"
/* SCSS */
$brand: #5f7fec;
/* SwiftUI */
Color(red: 0.373, green: 0.498, blue: 0.925)
/* Android */
Color.parseColor("#5f7fec")
/* Flutter */
Color(0xFF5F7FEC)
/* Python / OpenCV (BGR) */
(236, 127, 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 #5f7fec · 5.73:1
Use #000000AA at every size, AAA for large text only.
Aa
White text · 3.66:1
AA fail · AA large pass · AAA fail
Aa
Black text · 5.73:1 · recommended
AA pass · AA large pass · AAA fail
Reading the other direction: #5f7fec as text scores 3.66:1 on white and 5.73:1 on black.

Accessibility — WCAG contrast

Aa
#5f7fec on white: 3.66:1
AA ✗ fail · AA-large · AAA
Aa
#5f7fec on black: 5.73:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #4A8CF0
deuteranopia · #3380EA
tritanopia · #0098AA

Color scale — 50 to 950

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

#F3F5FC
#E6EBF9
#C7D1F5
#9BAFF3
#5f7fec
#365EE7
#1A46DB
#163AB6
#112E92
#11256A
#0B1742
Base = 400Lightest = 50 · #F3F5FCDarkest = 950 · #0B1742
:root {
  --brand-50: #F3F5FC;
  --brand-100: #E6EBF9;
  --brand-200: #C7D1F5;
  --brand-300: #9BAFF3;
  --brand-400: #5f7fec;
  --brand-500: #365EE7;
  --brand-600: #1A46DB;
  --brand-700: #163AB6;
  --brand-800: #112E92;
  --brand-900: #11256A;
  --brand-950: #0B1742;
  --brand: #5f7fec;
  --brand-ink: #000000;
}

Colors that work with #5f7fec

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#C0CAED
Hairlines and dividers
Muted text#4B5D9B
Captions on the surface
Accent#BB6A11
Second voice, not a rival
Dark variant#0E2472
Hover, pressed, headers
Light variant#E8EDFC
Selected rows, tints
Dark surface#141724
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 #5f7fec

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#ECCC5F
Analogous left#5FC5EC
Analogous right#865FEC
Split-complement 1#EC865F
Split-complement 2#C5EC5F
Triadic 1#EC5F7F
Triadic 2#7FEC5F
Tetradic#EC5FC5

RGB percentages

Red37.3%
Green49.8%
Blue92.5%

CMYK percentages

Cyan59.7%
Magenta46.2%
Yellow0.0%
Key (black)7.5%

Color previews

#5f7fec text on a black background

contrast 5.73:1

Card sample

#5f7fec text on a white background

contrast 3.66:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(95, 127, 236, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(95, 127, 236, 0.45);
Border & gradient
Gradient panel
border: 3px solid #5f7fec;
background: linear-gradient(135deg, #5f7fec, #9D5FEC);

Monochromatic scale

Palettes built from #5f7fec

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.

#5f7fec 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

Sits outside most CMYK gamuts — expect a duller press result, or specify a spot ink.

#5f7fec, answered

What color is #5f7fec?

#5f7fec is a balanced electric blue, closest to Cornflower Blue (ΔE2000 7.2). It sits at 226° on the hue wheel with 79% saturation and 65% lightness, which reads as cool.

What is the RGB value of #5f7fec?

rgb(95, 127, 236) — 95 red, 127 green and 236 blue out of 255, or 37.3% / 49.8% / 92.5% by channel.

Is #5f7fec a light or a dark color?

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

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

Black. It scores 5.73:1 against #5f7fec, versus 3.66:1 for white — AA at any size.

What is the complementary color of #5f7fec?

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

What colors go well with #5f7fec?

For interface work: #F4F6FA as the surface, #C0CAED for borders, #4B5D9B for secondary text, #BB6A11 as an accent and #0E2472 for hover and pressed states. For a palette, the analogous pair #5FC5EC and #865FEC stays calm, while #ECCC5F is the loudest partner.

What is #5f7fec in CMYK for printing?

cmyk(60%, 46%, 0%, 8%). This is a screen-to-ink approximation — a color this saturated sits outside most CMYK gamuts and will print duller than it looks here.

Is #5f7fec warm or cool?

Cool — it scores 91 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #735FEC; nudged cooler, #5D92EE.

Work with #5f7fec in the Color Lab