Skip to content

#842df4

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

RGB
132, 45, 244
HSL
266°, 90%, 57%
CMYK
46, 82, 0, 4
Luminance
0.1331

At a glance

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

Hex
#842df4
Hue
266°
violet
Saturation
90%
electric
Lightness
57%
balanced
Brightness
96%
HSV value
Perceived
45%
weighted brightness
Luminance
0.1331
WCAG relative
Temperature
Cool
69/100 cool
Color family
Violet
Tone
Electric
Best ink
White
5.73:1
Closest name
Blue Violet
ΔE2000 2.5
Where it sits
Hue266° of 360°
Saturation90%
Lightness57%
Temperature
Warm ← → Cool69% 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#842df4
RGBrgb(132, 45, 244)
HSLhsl(266, 90%, 57%)
CMYKcmyk(46%, 82%, 0%, 4%)
LABlab(43.2 72.5 -83.3)
LCHlch(43.2 110.4 311.0)
OKLCHoklch(0.544 0.265 295.6)
Decimal8662516
Display P3color(display-p3 0.518 0.176 0.957)

Copy-ready code

/* CSS */
color: #842df4;
background-color: #842df4;
/* Tailwind (arbitrary) */
class="text-[#842df4] bg-[#842df4]"
/* SCSS */
$brand: #842df4;
/* SwiftUI */
Color(red: 0.518, green: 0.176, blue: 0.957)
/* Android */
Color.parseColor("#842df4")
/* Flutter */
Color(0xFF842DF4)
/* Python / OpenCV (BGR) */
(244, 45, 132)

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

Accessibility — WCAG contrast

Aa
#842df4 on white: 5.73:1
AA ✓ pass · AA-large · AAA
Aa
#842df4 on black: 3.66:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0067F9
deuteranopia · #0063F0
tritanopia · #636994

Color scale — 50 to 950

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

#F7F2FD
#EEE5FB
#DAC3F8
#C194F9
#A15FF7
#842df4
#6C0CE9
#5A0AC2
#48089B
#370B70
#220746
Base = 500Lightest = 50 · #F7F2FDDarkest = 950 · #220746
:root {
  --brand-50: #F7F2FD;
  --brand-100: #EEE5FB;
  --brand-200: #DAC3F8;
  --brand-300: #C194F9;
  --brand-400: #A15FF7;
  --brand-500: #842df4;
  --brand-600: #6C0CE9;
  --brand-700: #5A0AC2;
  --brand-800: #48089B;
  --brand-900: #370B70;
  --brand-950: #220746;
  --brand: #842df4;
  --brand-ink: #ffffff;
}

Colors that work with #842df4

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#F7F4FA
Tinted page background
Border#D3C0ED
Hairlines and dividers
Muted text#6E4B9B
Captions on the surface
Accent#A3C606
Second voice, not a rival
Dark variant#380679
Hover, pressed, headers
Light variant#F1E7FE
Selected rows, tints
Dark surface#1B1424
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 #842df4

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
  • 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#9DF42D
Analogous left#2D3AF4
Analogous right#E72DF4
Split-complement 1#F4E72D
Split-complement 2#3AF42D
Triadic 1#F4842D
Triadic 2#2DF484
Tetradic#F42D3A

RGB percentages

Red51.8%
Green17.6%
Blue95.7%

CMYK percentages

Cyan45.9%
Magenta81.6%
Yellow0.0%
Key (black)4.3%

Color previews

#842df4 text on a black background

contrast 3.66:1

Card sample

#842df4 text on a white background

contrast 5.73:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(132, 45, 244, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(132, 45, 244, 0.45);
Border & gradient
Gradient panel
border: 3px solid #842df4;
background: linear-gradient(135deg, #842df4, #F42DDF);

Monochromatic scale

Palettes built from #842df4

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.

#842df4 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.

#842df4, answered

What color is #842df4?

#842df4 is a balanced electric violet, closest to Blue Violet (ΔE2000 2.5). It sits at 266° on the hue wheel with 90% saturation and 57% lightness, which reads as cool.

What is the RGB value of #842df4?

rgb(132, 45, 244) — 132 red, 45 green and 244 blue out of 255, or 51.8% / 17.6% / 95.7% by channel.

Is #842df4 a light or a dark color?

It is a dark color. Relative luminance is 0.1331 and perceived brightness is 45%, so white text on it reaches 5.73:1.

Should I use black or white text on #842df4?

White. It scores 5.73:1 against #842df4, versus 3.66:1 for black — AA at any size.

What is the complementary color of #842df4?

#9DF42D sits directly opposite on the wheel. Softer options are the split-complements #F4E72D and #3AF42D, which give the same contrast with far less vibration.

What colors go well with #842df4?

For interface work: #F7F4FA as the surface, #D3C0ED for borders, #6E4B9B for secondary text, #A3C606 as an accent and #380679 for hover and pressed states. For a palette, the analogous pair #2D3AF4 and #E72DF4 stays calm, while #9DF42D is the loudest partner.

What is #842df4 in CMYK for printing?

cmyk(46%, 82%, 0%, 4%). 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 #842df4 warm or cool?

Cool — it scores 69 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #CD2DF4; nudged cooler, #392BF6.

Work with #842df4 in the Color Lab