Skip to content

#512eb0

a dark, vivid violet · cool · closest name: Rebecca Purple

RGB
81, 46, 176
HSL
256°, 59%, 44%
CMYK
54, 74, 0, 31
Luminance
0.0684

At a glance

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

Hex
#512eb0
Hue
256°
violet
Saturation
59%
vivid
Lightness
44%
dark
Brightness
69%
HSV value
Perceived
32%
weighted brightness
Luminance
0.0684
WCAG relative
Temperature
Cool
74/100 cool
Color family
Violet
Tone
Vivid
Best ink
White
8.87:1
Closest name
Rebecca Purple
ΔE2000 5.8
Where it sits
Hue256° of 360°
Saturation59%
Lightness44%
Temperature
Warm ← → Cool74% 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#512eb0
RGBrgb(81, 46, 176)
HSLhsl(256, 59%, 44%)
CMYKcmyk(54%, 74%, 0%, 31%)
LABlab(31.4 47.8 -63.5)
LCHlch(31.4 79.5 307.0)
OKLCHoklch(0.430 0.192 287.8)
Decimal5320368
Display P3color(display-p3 0.318 0.180 0.690)

Copy-ready code

/* CSS */
color: #512eb0;
background-color: #512eb0;
/* Tailwind (arbitrary) */
class="text-[#512eb0] bg-[#512eb0]"
/* SCSS */
$brand: #512eb0;
/* SwiftUI */
Color(red: 0.318, green: 0.180, blue: 0.690)
/* Android */
Color.parseColor("#512eb0")
/* Flutter */
Color(0xFF512EB0)
/* Python / OpenCV (BGR) */
(176, 46, 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 #512eb0 · 8.87:1
Use #ffffffAAA at every size.
Aa
White text · 8.87:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 2.37:1
AA fail · AA large fail · AAA fail
Reading the other direction: #512eb0 as text scores 8.87:1 on white and 2.37:1 on black.

Accessibility — WCAG contrast

Aa
#512eb0 on white: 8.87:1
AA ✓ pass · AA-large · AAA
Aa
#512eb0 on black: 2.37:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #004DB4
deuteranopia · #0046AE
tritanopia · #2A516C

Color scale — 50 to 950

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

#F6F4FB
#ECE9F7
#D6CDEF
#B8A6E8
#947ADC
#714DD1
#5933C2
#512eb0
#3C2281
#2E1C5E
#1D123B
Base = 700Lightest = 50 · #F6F4FBDarkest = 950 · #1D123B
:root {
  --brand-50: #F6F4FB;
  --brand-100: #ECE9F7;
  --brand-200: #D6CDEF;
  --brand-300: #B8A6E8;
  --brand-400: #947ADC;
  --brand-500: #714DD1;
  --brand-600: #5933C2;
  --brand-700: #512eb0;
  --brand-800: #3C2281;
  --brand-900: #2E1C5E;
  --brand-950: #1D123B;
  --brand: #512eb0;
  --brand-ink: #ffffff;
}

Colors that work with #512eb0

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#CCC0ED
Hairlines and dividers
Muted text#604B9B
Captions on the surface
Accent#A4A626
Second voice, not a rival
Dark variant#2F1A65
Hover, pressed, headers
Light variant#EFEBFA
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 #512eb0

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
  • Headers, footers and dark-mode surfaces
  • Brand accents, badges and data highlights
Use with care
  • Text on black or near-black surfaces
  • Full-page backgrounds — tiring over long sessions
  • Black 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#8DB02E
Analogous left#2E4CB0
Analogous right#922EB0
Split-complement 1#B0922E
Split-complement 2#4CB02E
Triadic 1#B0512E
Triadic 2#2EB051
Tetradic#B02E4C

RGB percentages

Red31.8%
Green18.0%
Blue69.0%

CMYK percentages

Cyan54.0%
Magenta73.9%
Yellow0.0%
Key (black)31.0%

Color previews

#512eb0 text on a black background

contrast 2.37:1

Card sample

#512eb0 text on a white background

contrast 8.87:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #512eb0;
Background color
Panel with #512eb0 background
background-color: #512eb0;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #512eb0;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(81, 46, 176, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(81, 46, 176, 0.45);
Border & gradient
Gradient panel
border: 3px solid #512eb0;
background: linear-gradient(135deg, #512eb0, #A82EB0);

Monochromatic scale

Palettes built from #512eb0

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.

#512eb0 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

Converts to four-color process without much drama. Proof it anyway.

#512eb0, answered

What color is #512eb0?

#512eb0 is a dark vivid violet, closest to Rebecca Purple (ΔE2000 5.8). It sits at 256° on the hue wheel with 59% saturation and 44% lightness, which reads as cool.

What is the RGB value of #512eb0?

rgb(81, 46, 176) — 81 red, 46 green and 176 blue out of 255, or 31.8% / 18% / 69% by channel.

Is #512eb0 a light or a dark color?

It is a dark color. Relative luminance is 0.0684 and perceived brightness is 32%, so white text on it reaches 8.87:1.

Should I use black or white text on #512eb0?

White. It scores 8.87:1 against #512eb0, versus 2.37:1 for black — AAA at any size.

What is the complementary color of #512eb0?

#8DB02E sits directly opposite on the wheel. Softer options are the split-complements #B0922E and #4CB02E, which give the same contrast with far less vibration.

What colors go well with #512eb0?

For interface work: #F6F4FA as the surface, #CCC0ED for borders, #604B9B for secondary text, #A4A626 as an accent and #2F1A65 for hover and pressed states. For a palette, the analogous pair #2E4CB0 and #922EB0 stays calm, while #8DB02E is the loudest partner.

What is #512eb0 in CMYK for printing?

cmyk(54%, 74%, 0%, 31%). This is a screen-to-ink approximation — ask your printer for a proof before committing to a run.

Is #512eb0 warm or cool?

Cool — it scores 74 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #812EB0; nudged cooler, #2C39B2.

Work with #512eb0 in the Color Lab