Skip to content

#5f5fef

a light, electric blue · cool · closest name: Medium Slate Blue

RGB
95, 95, 239
HSL
240°, 82%, 66%
CMYK
60, 60, 0, 6
Luminance
0.1685

At a glance

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

Hex
#5f5fef
Hue
240°
blue
Saturation
82%
electric
Lightness
66%
light
Brightness
94%
HSV value
Perceived
47%
weighted brightness
Luminance
0.1685
WCAG relative
Temperature
Cool
83/100 cool
Color family
Blue
Tone
Electric
Best ink
White
4.81:1
Closest name
Medium Slate Blue
ΔE2000 5
Where it sits
Hue240° of 360°
Saturation82%
Lightness66%
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#5f5fef
RGBrgb(95, 95, 239)
HSLhsl(240, 82%, 66%)
CMYKcmyk(60%, 60%, 0%, 6%)
LABlab(48.1 41.6 -72.7)
LCHlch(48.1 83.7 299.8)
OKLCHoklch(0.569 0.211 277.3)
Decimal6250479
Display P3color(display-p3 0.373 0.373 0.937)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#5f5fef on white: 4.81:1
AA ✓ pass · AA-large · AAA
Aa
#5f5fef on black: 4.37:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0078F4
deuteranopia · #006CEC
tritanopia · #00829E

Color scale — 50 to 950

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

#F2F2FC
#E6E6F9
#C6C6F6
#9999F5
#5f5fef
#3333EB
#1616DF
#1313B9
#0F0F94
#0F0F6B
#090943
Base = 400Lightest = 50 · #F2F2FCDarkest = 950 · #090943
:root {
  --brand-50: #F2F2FC;
  --brand-100: #E6E6F9;
  --brand-200: #C6C6F6;
  --brand-300: #9999F5;
  --brand-400: #5f5fef;
  --brand-500: #3333EB;
  --brand-600: #1616DF;
  --brand-700: #1313B9;
  --brand-800: #0F0F94;
  --brand-900: #0F0F6B;
  --brand-950: #090943;
  --brand: #5f5fef;
  --brand-ink: #ffffff;
}

Colors that work with #5f5fef

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#BE920E
Second voice, not a rival
Dark variant#0C0C74
Hover, pressed, headers
Light variant#E8E8FD
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 #5f5fef

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
  • Card and section backgrounds
  • Brand accents, badges and data highlights
Use with care
  • 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#EFEF5F
Analogous left#5FA7EF
Analogous right#A75FEF
Split-complement 1#EFA75F
Split-complement 2#A7EF5F
Triadic 1#EF5F5F
Triadic 2#5FEF5F
Tetradic#EF5FA7

RGB percentages

Red37.3%
Green37.3%
Blue93.7%

CMYK percentages

Cyan60.3%
Magenta60.3%
Yellow0.0%
Key (black)6.3%

Color previews

#5f5fef text on a black background

contrast 4.37:1

Card sample

#5f5fef text on a white background

contrast 4.81:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #5f5fef

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.

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

#5f5fef, answered

What color is #5f5fef?

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

What is the RGB value of #5f5fef?

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

Is #5f5fef a light or a dark color?

It is a dark color. Relative luminance is 0.1685 and perceived brightness is 47%, so white text on it reaches 4.81:1.

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

White. It scores 4.81:1 against #5f5fef, versus 4.37:1 for black — AA at any size.

What is the complementary color of #5f5fef?

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

What colors go well with #5f5fef?

For interface work: #F4F4FA as the surface, #C0C0ED for borders, #4B4B9B for secondary text, #BE920E as an accent and #0C0C74 for hover and pressed states. For a palette, the analogous pair #5FA7EF and #A75FEF stays calm, while #EFEF5F is the loudest partner.

What is #5f5fef in CMYK for printing?

cmyk(60%, 60%, 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 #5f5fef 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 #945FEF; nudged cooler, #5D85F1.

Work with #5f5fef in the Color Lab