Skip to content

#511cec

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

RGB
81, 28, 236
HSL
255°, 85%, 52%
CMYK
66, 88, 0, 8
Luminance
0.0864

At a glance

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

Hex
#511cec
Hue
255°
violet
Saturation
85%
electric
Lightness
52%
balanced
Brightness
93%
HSV value
Perceived
37%
weighted brightness
Luminance
0.0864
WCAG relative
Temperature
Cool
75/100 cool
Color family
Violet
Tone
Electric
Best ink
White
7.70:1
Closest name
Blue
ΔE2000 4
Where it sits
Hue255° of 360°
Saturation85%
Lightness52%
Temperature
Warm ← → Cool75% 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#511cec
RGBrgb(81, 28, 236)
HSLhsl(255, 85%, 52%)
CMYKcmyk(66%, 88%, 0%, 8%)
LABlab(35.3 71.1 -92.1)
LCHlch(35.3 116.3 307.7)
OKLCHoklch(0.475 0.270 280.3)
Decimal5315820
Display P3color(display-p3 0.318 0.110 0.925)

Copy-ready code

/* CSS */
color: #511cec;
background-color: #511cec;
/* Tailwind (arbitrary) */
class="text-[#511cec] bg-[#511cec]"
/* SCSS */
$brand: #511cec;
/* SwiftUI */
Color(red: 0.318, green: 0.110, blue: 0.925)
/* Android */
Color.parseColor("#511cec")
/* Flutter */
Color(0xFF511CEC)
/* Python / OpenCV (BGR) */
(236, 28, 81)

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 #511cec · 7.70:1
Use #ffffffAAA at every size.
Aa
White text · 7.70:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 2.73:1
AA fail · AA large fail · AAA fail
Reading the other direction: #511cec as text scores 7.70:1 on white and 2.73:1 on black.

Accessibility — WCAG contrast

Aa
#511cec on white: 7.70:1
AA ✓ pass · AA-large · AAA
Aa
#511cec on black: 2.73:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #005AF1
deuteranopia · #004BE9
tritanopia · #00648C

Color scale — 50 to 950

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

#F5F2FC
#EBE6FA
#D2C5F7
#B097F6
#8864F2
#6030EE
#511cec
#3C10BC
#300D97
#260E6D
#180844
Base = 600Lightest = 50 · #F5F2FCDarkest = 950 · #180844
:root {
  --brand-50: #F5F2FC;
  --brand-100: #EBE6FA;
  --brand-200: #D2C5F7;
  --brand-300: #B097F6;
  --brand-400: #8864F2;
  --brand-500: #6030EE;
  --brand-600: #511cec;
  --brand-700: #3C10BC;
  --brand-800: #300D97;
  --brand-900: #260E6D;
  --brand-950: #180844;
  --brand: #511cec;
  --brand-ink: #ffffff;
}

Colors that work with #511cec

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#CBC0ED
Hairlines and dividers
Muted text#5F4B9B
Captions on the surface
Accent#BFC00C
Second voice, not a rival
Dark variant#250A76
Hover, pressed, headers
Light variant#EDE7FD
Selected rows, tints
Dark surface#181424
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 #511cec

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#B7EC1C
Analogous left#1C4FEC
Analogous right#B91CEC
Split-complement 1#ECB91C
Split-complement 2#4FEC1C
Triadic 1#EC511C
Triadic 2#1CEC51
Tetradic#EC1C4F

RGB percentages

Red31.8%
Green11.0%
Blue92.5%

CMYK percentages

Cyan65.7%
Magenta88.1%
Yellow0.0%
Key (black)7.5%

Color previews

#511cec text on a black background

contrast 2.73:1

Card sample

#511cec text on a white background

contrast 7.70:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #511cec;
Background color
Panel with #511cec background
background-color: #511cec;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #511cec;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(81, 28, 236, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(81, 28, 236, 0.45);
Border & gradient
Gradient panel
border: 3px solid #511cec;
background: linear-gradient(135deg, #511cec, #DC1CEC);

Monochromatic scale

Palettes built from #511cec

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.

#511cec 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.

#511cec, answered

What color is #511cec?

#511cec is a balanced electric violet, closest to Blue (ΔE2000 4). It sits at 255° on the hue wheel with 85% saturation and 52% lightness, which reads as cool.

What is the RGB value of #511cec?

rgb(81, 28, 236) — 81 red, 28 green and 236 blue out of 255, or 31.8% / 11% / 92.5% by channel.

Is #511cec a light or a dark color?

It is a dark color. Relative luminance is 0.0864 and perceived brightness is 37%, so white text on it reaches 7.70:1.

Should I use black or white text on #511cec?

White. It scores 7.70:1 against #511cec, versus 2.73:1 for black — AAA at any size.

What is the complementary color of #511cec?

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

What colors go well with #511cec?

For interface work: #F6F4FA as the surface, #CBC0ED for borders, #5F4B9B for secondary text, #BFC00C as an accent and #250A76 for hover and pressed states. For a palette, the analogous pair #1C4FEC and #B91CEC stays calm, while #B7EC1C is the loudest partner.

What is #511cec in CMYK for printing?

cmyk(66%, 88%, 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 #511cec warm or cool?

Cool — it scores 75 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #9D1CEC; nudged cooler, #1A31EF.

Work with #511cec in the Color Lab