Skip to content

#5f7cef

a light, electric blue · cool · closest name: Royal Blue

RGB
95, 124, 239
HSL
228°, 82%, 66%
CMYK
60, 48, 0, 6
Luminance
0.2308

At a glance

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

Hex
#5f7cef
Hue
228°
blue
Saturation
82%
electric
Lightness
66%
light
Brightness
94%
HSV value
Perceived
53%
weighted brightness
Luminance
0.2308
WCAG relative
Temperature
Cool
90/100 cool
Color family
Blue
Tone
Electric
Best ink
Black
5.62:1
Closest name
Royal Blue
ΔE2000 7.3
Where it sits
Hue228° of 360°
Saturation82%
Lightness66%
Temperature
Warm ← → Cool90% 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#5f7cef
RGBrgb(95, 124, 239)
HSLhsl(228, 82%, 66%)
CMYKcmyk(60%, 48%, 0%, 6%)
LABlab(55.1 24.0 -61.2)
LCHlch(55.1 65.8 291.4)
OKLCHoklch(0.622 0.175 270.0)
Decimal6257903
Display P3color(display-p3 0.373 0.486 0.937)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#5f7cef on white: 3.74:1
AA ✗ fail · AA-large · AAA
Aa
#5f7cef on black: 5.62:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #418BF3
deuteranopia · #257EED
tritanopia · #0096AA

Color scale — 50 to 950

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

#F2F4FC
#E6EAF9
#C6D0F6
#99ACF5
#5f7cef
#3358EB
#163FDF
#1334B9
#0F2A94
#0F226B
#091543
Base = 400Lightest = 50 · #F2F4FCDarkest = 950 · #091543
:root {
  --brand-50: #F2F4FC;
  --brand-100: #E6EAF9;
  --brand-200: #C6D0F6;
  --brand-300: #99ACF5;
  --brand-400: #5f7cef;
  --brand-500: #3358EB;
  --brand-600: #163FDF;
  --brand-700: #1334B9;
  --brand-800: #0F2A94;
  --brand-900: #0F226B;
  --brand-950: #091543;
  --brand: #5f7cef;
  --brand-ink: #000000;
}

Colors that work with #5f7cef

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#C0C9ED
Hairlines and dividers
Muted text#4B5B9B
Captions on the surface
Accent#BE6E0E
Second voice, not a rival
Dark variant#0C2174
Hover, pressed, headers
Light variant#E8ECFD
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 #5f7cef

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
  • Card and section backgrounds
  • Brand accents, badges and data highlights
Use with care
  • Small text on white — under 4.5:1
  • Full-page backgrounds — tiring over long sessions
  • White 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#EFD25F
Analogous left#5FC4EF
Analogous right#8A5FEF
Split-complement 1#EF8A5F
Split-complement 2#C4EF5F
Triadic 1#EF5F7C
Triadic 2#7CEF5F
Tetradic#EF5FC4

RGB percentages

Red37.3%
Green48.6%
Blue93.7%

CMYK percentages

Cyan60.3%
Magenta48.1%
Yellow0.0%
Key (black)6.3%

Color previews

#5f7cef text on a black background

contrast 5.62:1

Card sample

#5f7cef text on a white background

contrast 3.74:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(95, 124, 239, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(95, 124, 239, 0.45);
Border & gradient
Gradient panel
border: 3px solid #5f7cef;
background: linear-gradient(135deg, #5f7cef, #A25FEF);

Monochromatic scale

Palettes built from #5f7cef

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.

#5f7cef 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
SurfacesBadgesHighlightsEmpty states
Print note

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

#5f7cef, answered

What color is #5f7cef?

#5f7cef is a light electric blue, closest to Royal Blue (ΔE2000 7.3). It sits at 228° on the hue wheel with 82% saturation and 66% lightness, which reads as cool.

What is the RGB value of #5f7cef?

rgb(95, 124, 239) — 95 red, 124 green and 239 blue out of 255, or 37.3% / 48.6% / 93.7% by channel.

Is #5f7cef a light or a dark color?

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

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

Black. It scores 5.62:1 against #5f7cef, versus 3.74:1 for white — AA at any size.

What is the complementary color of #5f7cef?

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

What colors go well with #5f7cef?

For interface work: #F4F6FA as the surface, #C0C9ED for borders, #4B5B9B for secondary text, #BE6E0E as an accent and #0C2174 for hover and pressed states. For a palette, the analogous pair #5FC4EF and #8A5FEF stays calm, while #EFD25F is the loudest partner.

What is #5f7cef in CMYK for printing?

cmyk(60%, 48%, 0%, 6%). 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 #5f7cef warm or cool?

Cool — it scores 90 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #775FEF; nudged cooler, #5D92F1.

Work with #5f7cef in the Color Lab