Skip to content

#797dfe

a light, electric blue · cool · closest name: Medium Slate Blue

RGB
121, 125, 254
HSL
238°, 99%, 74%
CMYK
52, 51, 0, 0
Luminance
0.2589

At a glance

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

Hex
#797dfe
Hue
238°
blue
Saturation
99%
electric
Lightness
74%
light
Brightness
100%
HSV value
Perceived
57%
weighted brightness
Luminance
0.2589
WCAG relative
Temperature
Cool
84/100 cool
Color family
Blue
Tone
Electric
Best ink
Black
6.18:1
Closest name
Medium Slate Blue
ΔE2000 6.9
Where it sits
Hue238° of 360°
Saturation99%
Lightness74%
Temperature
Warm ← → Cool84% 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#797dfe
RGBrgb(121, 125, 254)
HSLhsl(238, 99%, 74%)
CMYKcmyk(52%, 51%, 0%, 0%)
LABlab(57.9 33.1 -65.0)
LCHlch(57.9 72.9 297.0)
OKLCHoklch(0.650 0.188 278.5)
Decimal7962110
Display P3color(display-p3 0.475 0.490 0.996)

Copy-ready code

/* CSS */
color: #797dfe;
background-color: #797dfe;
/* Tailwind (arbitrary) */
class="text-[#797dfe] bg-[#797dfe]"
/* SCSS */
$brand: #797dfe;
/* SwiftUI */
Color(red: 0.475, green: 0.490, blue: 0.996)
/* Android */
Color.parseColor("#797dfe")
/* Flutter */
Color(0xFF797DFE)
/* Python / OpenCV (BGR) */
(254, 125, 121)

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

Accessibility — WCAG contrast

Aa
#797dfe on white: 3.40:1
AA ✗ fail · AA-large · AAA
Aa
#797dfe on black: 6.18:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #3A91FF
deuteranopia · #2886FB
tritanopia · #3D9AB2

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #797dfe is pinned to step 300; the rest hold its hue and let saturation ease off at the extremes so the pale end never turns neon.

#F1F2FE
#E3E4FC
#C1C2FB
#797dfe
#585DFE
#2027FD
#0209F3
#0208CA
#0106A2
#060975
#040649
Base = 300Lightest = 50 · #F1F2FEDarkest = 950 · #040649
:root {
  --brand-50: #F1F2FE;
  --brand-100: #E3E4FC;
  --brand-200: #C1C2FB;
  --brand-300: #797dfe;
  --brand-400: #585DFE;
  --brand-500: #2027FD;
  --brand-600: #0209F3;
  --brand-700: #0208CA;
  --brand-800: #0106A2;
  --brand-900: #060975;
  --brand-950: #040649;
  --brand: #797dfe;
  --brand-ink: #000000;
}

Colors that work with #797dfe

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#F4F4FA
Tinted page background
Border#C0C1ED
Hairlines and dividers
Muted text#4B4D9B
Captions on the surface
Accent#CC9300
Second voice, not a rival
Dark variant#01057F
Hover, pressed, headers
Light variant#E6E6FF
Selected rows, tints
Dark surface#141424
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 #797dfe

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#FEFA79
Analogous left#79BFFE
Analogous right#B779FE
Split-complement 1#FEB779
Split-complement 2#BFFE79
Triadic 1#FE797D
Triadic 2#7DFE79
Tetradic#FE79BF

RGB percentages

Red47.5%
Green49.0%
Blue99.6%

CMYK percentages

Cyan52.4%
Magenta50.8%
Yellow0.0%
Key (black)0.4%

Color previews

#797dfe text on a black background

contrast 6.18:1

Card sample

#797dfe text on a white background

contrast 3.40:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(121, 125, 254, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(121, 125, 254, 0.45);
Border & gradient
Gradient panel
border: 3px solid #797dfe;
background: linear-gradient(135deg, #797dfe, #CE79FE);

Monochromatic scale

Palettes built from #797dfe

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.

#797dfe 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.

#797dfe, answered

What color is #797dfe?

#797dfe is a light electric blue, closest to Medium Slate Blue (ΔE2000 6.9). It sits at 238° on the hue wheel with 99% saturation and 74% lightness, which reads as cool.

What is the RGB value of #797dfe?

rgb(121, 125, 254) — 121 red, 125 green and 254 blue out of 255, or 47.5% / 49% / 99.6% by channel.

Is #797dfe a light or a dark color?

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

Should I use black or white text on #797dfe?

Black. It scores 6.18:1 against #797dfe, versus 3.40:1 for white — AA at any size.

What is the complementary color of #797dfe?

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

What colors go well with #797dfe?

For interface work: #F4F4FA as the surface, #C0C1ED for borders, #4B4D9B for secondary text, #CC9300 as an accent and #01057F for hover and pressed states. For a palette, the analogous pair #79BFFE and #B779FE stays calm, while #FEFA79 is the loudest partner.

What is #797dfe in CMYK for printing?

cmyk(52%, 51%, 0%, 0%). 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 #797dfe warm or cool?

Cool — it scores 84 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #A679FE; nudged cooler, #789FFF.

Work with #797dfe in the Color Lab