Skip to content

#9d7af2

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

RGB
157, 122, 242
HSL
258°, 82%, 71%
CMYK
35, 50, 0, 5
Luminance
0.2750

At a glance

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

Hex
#9d7af2
Hue
258°
violet
Saturation
82%
electric
Lightness
71%
light
Brightness
95%
HSV value
Perceived
59%
weighted brightness
Luminance
0.2750
WCAG relative
Temperature
Cool
74/100 cool
Color family
Violet
Tone
Electric
Best ink
Black
6.50:1
Closest name
Medium Purple
ΔE2000 4.5
Where it sits
Hue258° of 360°
Saturation82%
Lightness71%
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#9d7af2
RGBrgb(157, 122, 242)
HSLhsl(258, 82%, 71%)
CMYKcmyk(35%, 50%, 0%, 5%)
LABlab(59.4 39.6 -55.8)
LCHlch(59.4 68.4 305.4)
OKLCHoklch(0.666 0.173 294.7)
Decimal10320626
Display P3color(display-p3 0.616 0.478 0.949)

Copy-ready code

/* CSS */
color: #9d7af2;
background-color: #9d7af2;
/* Tailwind (arbitrary) */
class="text-[#9d7af2] bg-[#9d7af2]"
/* SCSS */
$brand: #9d7af2;
/* SwiftUI */
Color(red: 0.616, green: 0.478, blue: 0.949)
/* Android */
Color.parseColor("#9d7af2")
/* Flutter */
Color(0xFF9D7AF2)
/* Python / OpenCV (BGR) */
(242, 122, 157)

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

Accessibility — WCAG contrast

Aa
#9d7af2 on white: 3.23:1
AA ✗ fail · AA-large · AAA
Aa
#9d7af2 on black: 6.50:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #4D90F6
deuteranopia · #548DEF
tritanopia · #8992AB

Color scale — 50 to 950

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

#F5F2FC
#ECE6FA
#D4C6F6
#B499F5
#9d7af2
#6833EB
#5016DF
#4312BA
#360F95
#2A0F6B
#1A0943
Base = 400Lightest = 50 · #F5F2FCDarkest = 950 · #1A0943
:root {
  --brand-50: #F5F2FC;
  --brand-100: #ECE6FA;
  --brand-200: #D4C6F6;
  --brand-300: #B499F5;
  --brand-400: #9d7af2;
  --brand-500: #6833EB;
  --brand-600: #5016DF;
  --brand-700: #4312BA;
  --brand-800: #360F95;
  --brand-900: #2A0F6B;
  --brand-950: #1A0943;
  --brand: #9d7af2;
  --brand-ink: #000000;
}

Colors that work with #9d7af2

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#F6F4FA
Tinted page background
Border#CDC0ED
Hairlines and dividers
Muted text#624B9B
Captions on the surface
Accent#B7BE0E
Second voice, not a rival
Dark variant#2A0B74
Hover, pressed, headers
Light variant#EEE8FD
Selected rows, tints
Dark surface#191424
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 #9d7af2

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#CFF27A
Analogous left#7A93F2
Analogous right#D97AF2
Split-complement 1#F2D97A
Split-complement 2#93F27A
Triadic 1#F29D7A
Triadic 2#7AF29D
Tetradic#F27A93

RGB percentages

Red61.6%
Green47.8%
Blue94.9%

CMYK percentages

Cyan35.1%
Magenta49.6%
Yellow0.0%
Key (black)5.1%

Color previews

#9d7af2 text on a black background

contrast 6.50:1

Card sample

#9d7af2 text on a white background

contrast 3.23:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(157, 122, 242, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(157, 122, 242, 0.45);
Border & gradient
Gradient panel
border: 3px solid #9d7af2;
background: linear-gradient(135deg, #9d7af2, #ED7AF2);

Monochromatic scale

Palettes built from #9d7af2

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.

#9d7af2 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
SurfacesBadgesHighlightsEmpty states
Print note

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

#9d7af2, answered

What color is #9d7af2?

#9d7af2 is a light electric violet, closest to Medium Purple (ΔE2000 4.5). It sits at 258° on the hue wheel with 82% saturation and 71% lightness, which reads as cool.

What is the RGB value of #9d7af2?

rgb(157, 122, 242) — 157 red, 122 green and 242 blue out of 255, or 61.6% / 47.8% / 94.9% by channel.

Is #9d7af2 a light or a dark color?

It is a mid-tone. Relative luminance is 0.2750 and perceived brightness is 59%, so black text on it reaches 6.50:1.

Should I use black or white text on #9d7af2?

Black. It scores 6.50:1 against #9d7af2, versus 3.23:1 for white — AA at any size.

What is the complementary color of #9d7af2?

#CFF27A sits directly opposite on the wheel. Softer options are the split-complements #F2D97A and #93F27A, which give the same contrast with far less vibration.

What colors go well with #9d7af2?

For interface work: #F6F4FA as the surface, #CDC0ED for borders, #624B9B for secondary text, #B7BE0E as an accent and #2A0B74 for hover and pressed states. For a palette, the analogous pair #7A93F2 and #D97AF2 stays calm, while #CFF27A is the loudest partner.

What is #9d7af2 in CMYK for printing?

cmyk(35%, 50%, 0%, 5%). 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 #9d7af2 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 #C97AF2; nudged cooler, #7982F3.

Work with #9d7af2 in the Color Lab