Skip to content

#682afb

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

RGB
104, 42, 251
HSL
258°, 96%, 58%
CMYK
59, 83, 0, 2
Luminance
0.1156

At a glance

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

Hex
#682afb
Hue
258°
violet
Saturation
96%
electric
Lightness
58%
balanced
Brightness
98%
HSV value
Perceived
42%
weighted brightness
Luminance
0.1156
WCAG relative
Temperature
Cool
73/100 cool
Color family
Violet
Tone
Electric
Best ink
White
6.34:1
Closest name
Blue Violet
ΔE2000 5.4
Where it sits
Hue258° of 360°
Saturation96%
Lightness58%
Temperature
Warm ← → Cool73% 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#682afb
RGBrgb(104, 42, 251)
HSLhsl(258, 96%, 58%)
CMYKcmyk(59%, 83%, 0%, 2%)
LABlab(40.5 72.2 -91.8)
LCHlch(40.5 116.8 308.2)
OKLCHoklch(0.520 0.274 285.3)
Decimal6826747
Display P3color(display-p3 0.408 0.165 0.984)

Copy-ready code

/* CSS */
color: #682afb;
background-color: #682afb;
/* Tailwind (arbitrary) */
class="text-[#682afb] bg-[#682afb]"
/* SCSS */
$brand: #682afb;
/* SwiftUI */
Color(red: 0.408, green: 0.165, blue: 0.984)
/* Android */
Color.parseColor("#682afb")
/* Flutter */
Color(0xFF682AFB)
/* Python / OpenCV (BGR) */
(251, 42, 104)

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

Accessibility — WCAG contrast

Aa
#682afb on white: 6.34:1
AA ✓ pass · AA-large · AAA
Aa
#682afb on black: 3.31:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0065FF
deuteranopia · #0059F7
tritanopia · #006D97

Color scale — 50 to 950

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

#F5F1FD
#EBE4FC
#D2C1FA
#B191FD
#8A5AFC
#682afb
#4A05F0
#3E04C8
#3203A0
#270773
#180448
Base = 500Lightest = 50 · #F5F1FDDarkest = 950 · #180448
:root {
  --brand-50: #F5F1FD;
  --brand-100: #EBE4FC;
  --brand-200: #D2C1FA;
  --brand-300: #B191FD;
  --brand-400: #8A5AFC;
  --brand-500: #682afb;
  --brand-600: #4A05F0;
  --brand-700: #3E04C8;
  --brand-800: #3203A0;
  --brand-900: #270773;
  --brand-950: #180448;
  --brand: #682afb;
  --brand-ink: #ffffff;
}

Colors that work with #682afb

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#CDC0ED
Hairlines and dividers
Muted text#624B9B
Captions on the surface
Accent#C2CC00
Second voice, not a rival
Dark variant#27027D
Hover, pressed, headers
Light variant#EDE6FF
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 #682afb

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#BDFB2A
Analogous left#2A55FB
Analogous right#D12AFB
Split-complement 1#FBD12A
Split-complement 2#55FB2A
Triadic 1#FB682A
Triadic 2#2AFB68
Tetradic#FB2A55

RGB percentages

Red40.8%
Green16.5%
Blue98.4%

CMYK percentages

Cyan58.6%
Magenta83.3%
Yellow0.0%
Key (black)1.6%

Color previews

#682afb text on a black background

contrast 3.31:1

Card sample

#682afb text on a white background

contrast 6.34:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(104, 42, 251, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(104, 42, 251, 0.45);
Border & gradient
Gradient panel
border: 3px solid #682afb;
background: linear-gradient(135deg, #682afb, #F32AFB);

Monochromatic scale

Palettes built from #682afb

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.

#682afb 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.

#682afb, answered

What color is #682afb?

#682afb is a balanced electric violet, closest to Blue Violet (ΔE2000 5.4). It sits at 258° on the hue wheel with 96% saturation and 58% lightness, which reads as cool.

What is the RGB value of #682afb?

rgb(104, 42, 251) — 104 red, 42 green and 251 blue out of 255, or 40.8% / 16.5% / 98.4% by channel.

Is #682afb a light or a dark color?

It is a dark color. Relative luminance is 0.1156 and perceived brightness is 42%, so white text on it reaches 6.34:1.

Should I use black or white text on #682afb?

White. It scores 6.34:1 against #682afb, versus 3.31:1 for black — AA at any size.

What is the complementary color of #682afb?

#BDFB2A sits directly opposite on the wheel. Softer options are the split-complements #FBD12A and #55FB2A, which give the same contrast with far less vibration.

What colors go well with #682afb?

For interface work: #F6F4FA as the surface, #CDC0ED for borders, #624B9B for secondary text, #C2CC00 as an accent and #27027D for hover and pressed states. For a palette, the analogous pair #2A55FB and #D12AFB stays calm, while #BDFB2A is the loudest partner.

What is #682afb in CMYK for printing?

cmyk(59%, 83%, 0%, 2%). 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 #682afb warm or cool?

Cool — it scores 73 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #B52AFB; nudged cooler, #2837FD.

Work with #682afb in the Color Lab