Skip to content

#8a7eee

a light, electric blue · cool · closest name: Medium Purple

RGB
138, 126, 238
HSL
246°, 77%, 71%
CMYK
42, 47, 0, 7
Luminance
0.2650

At a glance

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

Hex
#8a7eee
Hue
246°
blue
Saturation
77%
electric
Lightness
71%
light
Brightness
93%
HSV value
Perceived
57%
weighted brightness
Luminance
0.2650
WCAG relative
Temperature
Cool
80/100 cool
Color family
Blue
Tone
Electric
Best ink
Black
6.30:1
Closest name
Medium Purple
ΔE2000 5.9
Where it sits
Hue246° of 360°
Saturation77%
Lightness71%
Temperature
Warm ← → Cool80% 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#8a7eee
RGBrgb(138, 126, 238)
HSLhsl(246, 77%, 71%)
CMYKcmyk(42%, 47%, 0%, 7%)
LABlab(58.5 31.6 -55.1)
LCHlch(58.5 63.5 299.8)
OKLCHoklch(0.655 0.162 285.9)
Decimal9076462
Display P3color(display-p3 0.541 0.494 0.933)

Copy-ready code

/* CSS */
color: #8a7eee;
background-color: #8a7eee;
/* Tailwind (arbitrary) */
class="text-[#8a7eee] bg-[#8a7eee]"
/* SCSS */
$brand: #8a7eee;
/* SwiftUI */
Color(red: 0.541, green: 0.494, blue: 0.933)
/* Android */
Color.parseColor("#8a7eee")
/* Flutter */
Color(0xFF8A7EEE)
/* Python / OpenCV (BGR) */
(238, 126, 138)

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

Accessibility — WCAG contrast

Aa
#8a7eee on white: 3.33:1
AA ✗ fail · AA-large · AAA
Aa
#8a7eee on black: 6.30:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #5190F2
deuteranopia · #4F89EB
tritanopia · #6C95AB

Color scale — 50 to 950

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

#F4F3FC
#E8E7F9
#CCC7F4
#A59CF2
#8a7eee
#4B39E5
#311DD8
#2818B4
#201390
#1B1268
#110B41
Base = 400Lightest = 50 · #F4F3FCDarkest = 950 · #110B41
:root {
  --brand-50: #F4F3FC;
  --brand-100: #E8E7F9;
  --brand-200: #CCC7F4;
  --brand-300: #A59CF2;
  --brand-400: #8a7eee;
  --brand-500: #4B39E5;
  --brand-600: #311DD8;
  --brand-700: #2818B4;
  --brand-800: #201390;
  --brand-900: #1B1268;
  --brand-950: #110B41;
  --brand: #8a7eee;
  --brand-ink: #000000;
}

Colors that work with #8a7eee

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#F5F4FA
Tinted page background
Border#C5C0ED
Hairlines and dividers
Muted text#534B9B
Captions on the surface
Accent#B8A114
Second voice, not a rival
Dark variant#190F71
Hover, pressed, headers
Light variant#EBE8FC
Selected rows, tints
Dark surface#151424
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 #8a7eee

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
  • Card and section backgrounds
  • Brand accents, badges and data highlights
Use with care
  • Small text on white — under 4.5:1
  • Full-page backgrounds — tiring over long sessions
  • White 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#E2EE7E
Analogous left#7EAAEE
Analogous right#C27EEE
Split-complement 1#EEC27E
Split-complement 2#AAEE7E
Triadic 1#EE8A7E
Triadic 2#7EEE8A
Tetradic#EE7EAA

RGB percentages

Red54.1%
Green49.4%
Blue93.3%

CMYK percentages

Cyan42.0%
Magenta47.1%
Yellow0.0%
Key (black)6.7%

Color previews

#8a7eee text on a black background

contrast 6.30:1

Card sample

#8a7eee text on a white background

contrast 3.33:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(138, 126, 238, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(138, 126, 238, 0.45);
Border & gradient
Gradient panel
border: 3px solid #8a7eee;
background: linear-gradient(135deg, #8a7eee, #D57EEE);

Monochromatic scale

Palettes built from #8a7eee

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.

#8a7eee in the real world

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

Industries
TechnologyFinanceHealthcareEnterprise SaaS
Common UI roles
SurfacesBadgesHighlightsEmpty states
Print note

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

#8a7eee, answered

What color is #8a7eee?

#8a7eee is a light electric blue, closest to Medium Purple (ΔE2000 5.9). It sits at 246° on the hue wheel with 77% saturation and 71% lightness, which reads as cool.

What is the RGB value of #8a7eee?

rgb(138, 126, 238) — 138 red, 126 green and 238 blue out of 255, or 54.1% / 49.4% / 93.3% by channel.

Is #8a7eee a light or a dark color?

It is a mid-tone. Relative luminance is 0.2650 and perceived brightness is 57%, so black text on it reaches 6.30:1.

Should I use black or white text on #8a7eee?

Black. It scores 6.30:1 against #8a7eee, versus 3.33:1 for white — AA at any size.

What is the complementary color of #8a7eee?

#E2EE7E sits directly opposite on the wheel. Softer options are the split-complements #EEC27E and #AAEE7E, which give the same contrast with far less vibration.

What colors go well with #8a7eee?

For interface work: #F5F4FA as the surface, #C5C0ED for borders, #534B9B for secondary text, #B8A114 as an accent and #190F71 for hover and pressed states. For a palette, the analogous pair #7EAAEE and #C27EEE stays calm, while #E2EE7E is the loudest partner.

What is #8a7eee in CMYK for printing?

cmyk(42%, 47%, 0%, 7%). 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 #8a7eee warm or cool?

Cool — it scores 80 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #B37EEE; nudged cooler, #7D9BEF.

Work with #8a7eee in the Color Lab