Skip to content

#020ac7

a dark, electric blue · cool · “Medium Blue”

RGB
2, 10, 199
HSL
238°, 98%, 39%
CMYK
99, 95, 0, 22
Luminance
0.0435

At a glance

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

Hex
#020ac7
Hue
238°
blue
Saturation
98%
electric
Lightness
39%
dark
Brightness
78%
HSV value
Perceived
27%
weighted brightness
Luminance
0.0435
WCAG relative
Temperature
Cool
85/100 cool
Color family
Blue
Tone
Electric
Best ink
White
11.23:1
Closest name
Medium Blue
ΔE2000 0.9
Where it sits
Hue238° of 360°
Saturation98%
Lightness39%
Temperature
Warm ← → Cool85% 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#020ac7
RGBrgb(2, 10, 199)
HSLhsl(238, 98%, 39%)
CMYKcmyk(99%, 95%, 0%, 22%)
LABlab(24.8 63.6 -88.3)
LCHlch(24.8 108.8 305.8)
OKLCHoklch(0.380 0.256 264.4)
Decimal133831
Display P3color(display-p3 0.008 0.039 0.780)

Copy-ready code

/* CSS */
color: #020ac7;
background-color: #020ac7;
/* Tailwind (arbitrary) */
class="text-[#020ac7] bg-[#020ac7]"
/* SCSS */
$brand: #020ac7;
/* SwiftUI */
Color(red: 0.008, green: 0.039, blue: 0.780)
/* Android */
Color.parseColor("#020ac7")
/* Flutter */
Color(0xFF020AC7)
/* Python / OpenCV (BGR) */
(199, 10, 2)

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 #020ac7 · 11.23:1
Use #ffffffAAA at every size.
Aa
White text · 11.23:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 1.87:1
AA fail · AA large fail · AAA fail
Reading the other direction: #020ac7 as text scores 11.23:1 on white and 1.87:1 on black.

Accessibility — WCAG contrast

Aa
#020ac7 on white: 11.23:1
AA ✓ pass · AA-large · AAA
Aa
#020ac7 on black: 1.87:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0045CC
deuteranopia · #0030C4
tritanopia · #005374

Color scale — 50 to 950

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

#F1F2FD
#E3E4FC
#C1C3FB
#9094FE
#585FFD
#212AFD
#020CF2
#020ac7
#0208A2
#060A74
#040749
Base = 700Lightest = 50 · #F1F2FDDarkest = 950 · #040749
:root {
  --brand-50: #F1F2FD;
  --brand-100: #E3E4FC;
  --brand-200: #C1C3FB;
  --brand-300: #9094FE;
  --brand-400: #585FFD;
  --brand-500: #212AFD;
  --brand-600: #020CF2;
  --brand-700: #020ac7;
  --brand-800: #0208A2;
  --brand-900: #060A74;
  --brand-950: #040749;
  --brand: #020ac7;
  --brand-ink: #ffffff;
}

Colors that work with #020ac7

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#F4F5FA
Tinted page background
Border#C0C2ED
Hairlines and dividers
Muted text#4B4E9B
Captions on the surface
Accent#CC9100
Second voice, not a rival
Dark variant#01067E
Hover, pressed, headers
Light variant#E6E7FF
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 #020ac7

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
  • Headers, footers and dark-mode surfaces
  • Brand accents, badges and data highlights
Use with care
  • Text on black or near-black surfaces
  • Full-page backgrounds — tiring over long sessions
  • Black 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#C7BF02
Analogous left#026CC7
Analogous right#5D02C7
Split-complement 1#C75D02
Split-complement 2#6CC702
Triadic 1#C7020A
Triadic 2#0AC702
Tetradic#C7026C

RGB percentages

Red0.8%
Green3.9%
Blue78.0%

CMYK percentages

Cyan99.0%
Magenta95.0%
Yellow0.0%
Key (black)22.0%

Color previews

#020ac7 text on a black background

contrast 1.87:1

Card sample

#020ac7 text on a white background

contrast 11.23:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #020ac7;
Background color
Panel with #020ac7 background
background-color: #020ac7;
Text shadow — hex

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(2, 10, 199, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(2, 10, 199, 0.45);
Border & gradient
Gradient panel
border: 3px solid #020ac7;
background: linear-gradient(135deg, #020ac7, #7D02C7);

Monochromatic scale

Palettes built from #020ac7

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.

#020ac7 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
ButtonsLinksFocus statesCharts
Print note

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

#020ac7, answered

What color is #020ac7?

#020ac7 is a dark electric blue — the CSS keyword Medium Blue. It sits at 238° on the hue wheel with 98% saturation and 39% lightness, which reads as cool.

What is the RGB value of #020ac7?

rgb(2, 10, 199) — 2 red, 10 green and 199 blue out of 255, or 0.8% / 3.9% / 78% by channel.

Is #020ac7 a light or a dark color?

It is a dark color. Relative luminance is 0.0435 and perceived brightness is 27%, so white text on it reaches 11.23:1.

Should I use black or white text on #020ac7?

White. It scores 11.23:1 against #020ac7, versus 1.87:1 for black — AAA at any size.

What is the complementary color of #020ac7?

#C7BF02 sits directly opposite on the wheel. Softer options are the split-complements #C75D02 and #6CC702, which give the same contrast with far less vibration.

What colors go well with #020ac7?

For interface work: #F4F5FA as the surface, #C0C2ED for borders, #4B4E9B for secondary text, #CC9100 as an accent and #01067E for hover and pressed states. For a palette, the analogous pair #026CC7 and #5D02C7 stays calm, while #C7BF02 is the loudest partner.

What is #020ac7 in CMYK for printing?

cmyk(99%, 95%, 0%, 22%). 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 #020ac7 warm or cool?

Cool — it scores 85 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #4202C7; nudged cooler, #0033C9.

Work with #020ac7 in the Color Lab