Skip to content

#5f23eb

a balanced, electric violet · cool · closest name: Blue

RGB
95, 35, 235
HSL
258°, 83%, 53%
CMYK
60, 85, 0, 8
Luminance
0.0963

At a glance

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

Hex
#5f23eb
Hue
258°
violet
Saturation
83%
electric
Lightness
53%
balanced
Brightness
92%
HSV value
Perceived
39%
weighted brightness
Luminance
0.0963
WCAG relative
Temperature
Cool
73/100 cool
Color family
Violet
Tone
Electric
Best ink
White
7.18:1
Closest name
Blue
ΔE2000 5.8
Where it sits
Hue258° of 360°
Saturation83%
Lightness53%
Temperature
Warm ← → Cool73% 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#5f23eb
RGBrgb(95, 35, 235)
HSLhsl(258, 83%, 53%)
CMYKcmyk(60%, 85%, 0%, 8%)
LABlab(37.2 69.7 -88.3)
LCHlch(37.2 112.5 308.3)
OKLCHoklch(0.491 0.263 284.8)
Decimal6235115
Display P3color(display-p3 0.373 0.137 0.922)

Copy-ready code

/* CSS */
color: #5f23eb;
background-color: #5f23eb;
/* Tailwind (arbitrary) */
class="text-[#5f23eb] bg-[#5f23eb]"
/* SCSS */
$brand: #5f23eb;
/* SwiftUI */
Color(red: 0.373, green: 0.137, blue: 0.922)
/* Android */
Color.parseColor("#5f23eb")
/* Flutter */
Color(0xFF5F23EB)
/* Python / OpenCV (BGR) */
(235, 35, 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 #5f23eb · 7.18:1
Use #ffffffAAA at every size.
Aa
White text · 7.18:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 2.93:1
AA fail · AA large fail · AAA fail
Reading the other direction: #5f23eb as text scores 7.18:1 on white and 2.93:1 on black.

Accessibility — WCAG contrast

Aa
#5f23eb on white: 7.18:1
AA ✓ pass · AA-large · AAA
Aa
#5f23eb on black: 2.93:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #005DF0
deuteranopia · #0051E8
tritanopia · #00658D

Color scale — 50 to 950

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

#F5F2FC
#ECE6FA
#D4C6F6
#B498F6
#8F65F1
#5f23eb
#5214E0
#4411BB
#360E96
#2A0E6C
#1B0944
Base = 500Lightest = 50 · #F5F2FCDarkest = 950 · #1B0944
:root {
  --brand-50: #F5F2FC;
  --brand-100: #ECE6FA;
  --brand-200: #D4C6F6;
  --brand-300: #B498F6;
  --brand-400: #8F65F1;
  --brand-500: #5f23eb;
  --brand-600: #5214E0;
  --brand-700: #4411BB;
  --brand-800: #360E96;
  --brand-900: #2A0E6C;
  --brand-950: #1B0944;
  --brand: #5f23eb;
  --brand-ink: #ffffff;
}

Colors that work with #5f23eb

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#F6F4FA
Tinted page background
Border#CDC0ED
Hairlines and dividers
Muted text#634B9B
Captions on the surface
Accent#B6BF0D
Second voice, not a rival
Dark variant#2B0B75
Hover, pressed, headers
Light variant#EEE8FD
Selected rows, tints
Dark surface#191424
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 #5f23eb

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
  • Text on black or near-black surfaces
  • 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#AFEB23
Analogous left#234BEB
Analogous right#C323EB
Split-complement 1#EBC323
Split-complement 2#4BEB23
Triadic 1#EB5F23
Triadic 2#23EB5F
Tetradic#EB234B

RGB percentages

Red37.3%
Green13.7%
Blue92.2%

CMYK percentages

Cyan59.6%
Magenta85.1%
Yellow0.0%
Key (black)7.8%

Color previews

#5f23eb text on a black background

contrast 2.93:1

Card sample

#5f23eb text on a white background

contrast 7.18:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #5f23eb

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.

#5f23eb in the real world

Where a color in this family tends to land, and the interface roles it is usually asked to play.

Industries
Creative toolsFintechBeautyLuxury
Common UI roles
ButtonsLinksFocus statesCharts
Print note

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

#5f23eb, answered

What color is #5f23eb?

#5f23eb is a balanced electric violet, closest to Blue (ΔE2000 5.8). It sits at 258° on the hue wheel with 83% saturation and 53% lightness, which reads as cool.

What is the RGB value of #5f23eb?

rgb(95, 35, 235) — 95 red, 35 green and 235 blue out of 255, or 37.3% / 13.7% / 92.2% by channel.

Is #5f23eb a light or a dark color?

It is a dark color. Relative luminance is 0.0963 and perceived brightness is 39%, so white text on it reaches 7.18:1.

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

White. It scores 7.18:1 against #5f23eb, versus 2.93:1 for black — AAA at any size.

What is the complementary color of #5f23eb?

#AFEB23 sits directly opposite on the wheel. Softer options are the split-complements #EBC323 and #4BEB23, which give the same contrast with far less vibration.

What colors go well with #5f23eb?

For interface work: #F6F4FA as the surface, #CDC0ED for borders, #634B9B for secondary text, #B6BF0D as an accent and #2B0B75 for hover and pressed states. For a palette, the analogous pair #234BEB and #C323EB stays calm, while #AFEB23 is the loudest partner.

What is #5f23eb in CMYK for printing?

cmyk(60%, 85%, 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 #5f23eb warm or cool?

Cool — it scores 73 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #A823EB; nudged cooler, #202EED.

Work with #5f23eb in the Color Lab