Skip to content

#b040fd

a balanced, electric violet · cool · closest name: Medium Orchid

RGB
176, 64, 253
HSL
276°, 98%, 62%
CMYK
30, 75, 0, 1
Luminance
0.1999

At a glance

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

Hex
#b040fd
Hue
276°
violet
Saturation
98%
electric
Lightness
62%
balanced
Brightness
99%
HSV value
Perceived
54%
weighted brightness
Luminance
0.1999
WCAG relative
Temperature
Cool
64/100 cool
Color family
Violet
Tone
Electric
Best ink
Black
5.00:1
Closest name
Medium Orchid
ΔE2000 7.5
Where it sits
Hue276° of 360°
Saturation98%
Lightness62%
Temperature
Warm ← → Cool64% 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#b040fd
RGBrgb(176, 64, 253)
HSLhsl(276, 98%, 62%)
CMYKcmyk(30%, 75%, 0%, 1%)
LABlab(51.8 74.3 -74.0)
LCHlch(51.8 104.8 315.1)
OKLCHoklch(0.618 0.264 307.1)
Decimal11550973
Display P3color(display-p3 0.690 0.251 0.992)

Copy-ready code

/* CSS */
color: #b040fd;
background-color: #b040fd;
/* Tailwind (arbitrary) */
class="text-[#b040fd] bg-[#b040fd]"
/* SCSS */
$brand: #b040fd;
/* SwiftUI */
Color(red: 0.690, green: 0.251, blue: 0.992)
/* Android */
Color.parseColor("#b040fd")
/* Flutter */
Color(0xFFB040FD)
/* Python / OpenCV (BGR) */
(253, 64, 176)

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 #b040fd · 5.00:1
Use #000000AA at every size, AAA for large text only.
Aa
White text · 4.20:1
AA fail · AA large pass · AAA fail
Aa
Black text · 5.00:1 · recommended
AA pass · AA large pass · AAA fail
Reading the other direction: #b040fd as text scores 4.20:1 on white and 5.00:1 on black.

Accessibility — WCAG contrast

Aa
#b040fd on white: 4.20:1
AA ✗ fail · AA-large · AAA
Aa
#b040fd on black: 5.00:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #0078FF
deuteranopia · #007CF9
tritanopia · #A36F9D

Color scale — 50 to 950

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

#F8F1FD
#F2E3FC
#E3C1FB
#D190FE
#b040fd
#A321FD
#9103F2
#7902CA
#6102A1
#470674
#2D0449
Base = 400Lightest = 50 · #F8F1FDDarkest = 950 · #2D0449
:root {
  --brand-50: #F8F1FD;
  --brand-100: #F2E3FC;
  --brand-200: #E3C1FB;
  --brand-300: #D190FE;
  --brand-400: #b040fd;
  --brand-500: #A321FD;
  --brand-600: #9103F2;
  --brand-700: #7902CA;
  --brand-800: #6102A1;
  --brand-900: #470674;
  --brand-950: #2D0449;
  --brand: #b040fd;
  --brand-ink: #000000;
}

Colors that work with #b040fd

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#F8F4FA
Tinted page background
Border#DAC0ED
Hairlines and dividers
Muted text#7A4B9B
Captions on the surface
Accent#86CC00
Second voice, not a rival
Dark variant#4B017E
Hover, pressed, headers
Light variant#F5E6FF
Selected rows, tints
Dark surface#1E1424
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 #b040fd

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
  • Brand accents, badges and data highlights
Use with care
  • Small text on white — under 4.5:1
  • 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#8DFD40
Analogous left#5240FD
Analogous right#FD40EB
Split-complement 1#EBFD40
Split-complement 2#40FD52
Triadic 1#FDB040
Triadic 2#40FDB0
Tetradic#FD5240

RGB percentages

Red69.0%
Green25.1%
Blue99.2%

CMYK percentages

Cyan30.4%
Magenta74.7%
Yellow0.0%
Key (black)0.8%

Color previews

#b040fd text on a black background

contrast 5.00:1

Card sample

#b040fd text on a white background

contrast 4.20:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(176, 64, 253, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(176, 64, 253, 0.45);
Border & gradient
Gradient panel
border: 3px solid #b040fd;
background: linear-gradient(135deg, #b040fd, #FD40CC);

Monochromatic scale

Palettes built from #b040fd

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.

#b040fd 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.

#b040fd, answered

What color is #b040fd?

#b040fd is a balanced electric violet, closest to Medium Orchid (ΔE2000 7.5). It sits at 276° on the hue wheel with 98% saturation and 62% lightness, which reads as cool.

What is the RGB value of #b040fd?

rgb(176, 64, 253) — 176 red, 64 green and 253 blue out of 255, or 69% / 25.1% / 99.2% by channel.

Is #b040fd a light or a dark color?

It is a mid-tone. Relative luminance is 0.1999 and perceived brightness is 54%, so black text on it reaches 5.00:1.

Should I use black or white text on #b040fd?

Black. It scores 5.00:1 against #b040fd, versus 4.20:1 for white — AA at any size.

What is the complementary color of #b040fd?

#8DFD40 sits directly opposite on the wheel. Softer options are the split-complements #EBFD40 and #40FD52, which give the same contrast with far less vibration.

What colors go well with #b040fd?

For interface work: #F8F4FA as the surface, #DAC0ED for borders, #7A4B9B for secondary text, #86CC00 as an accent and #4B017E for hover and pressed states. For a palette, the analogous pair #5240FD and #FD40EB stays calm, while #8DFD40 is the loudest partner.

What is #b040fd in CMYK for printing?

cmyk(30%, 75%, 0%, 1%). 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 #b040fd warm or cool?

Cool — it scores 64 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #F540FD; nudged cooler, #6A3EFF.

Work with #b040fd in the Color Lab