Skip to content

#021eb2

a dark, electric blue · cool · closest name: Medium Blue

RGB
2, 30, 178
HSL
231°, 98%, 35%
CMYK
99, 83, 0, 30
Luminance
0.0416

At a glance

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

Hex
#021eb2
Hue
231°
blue
Saturation
98%
electric
Lightness
35%
dark
Brightness
70%
HSV value
Perceived
25%
weighted brightness
Luminance
0.0416
WCAG relative
Temperature
Cool
89/100 cool
Color family
Blue
Tone
Electric
Best ink
White
11.47:1
Closest name
Medium Blue
ΔE2000 4.2
Where it sits
Hue231° of 360°
Saturation98%
Lightness35%
Temperature
Warm ← → Cool89% 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#021eb2
RGBrgb(2, 30, 178)
HSLhsl(231, 98%, 35%)
CMYKcmyk(99%, 83%, 0%, 30%)
LABlab(24.2 50.6 -76.8)
LCHlch(24.2 92.0 303.4)
OKLCHoklch(0.368 0.224 264.4)
Decimal138930
Display P3color(display-p3 0.008 0.118 0.698)

Copy-ready code

/* CSS */
color: #021eb2;
background-color: #021eb2;
/* Tailwind (arbitrary) */
class="text-[#021eb2] bg-[#021eb2]"
/* SCSS */
$brand: #021eb2;
/* SwiftUI */
Color(red: 0.008, green: 0.118, blue: 0.698)
/* Android */
Color.parseColor("#021eb2")
/* Flutter */
Color(0xFF021EB2)
/* Python / OpenCV (BGR) */
(178, 30, 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 #021eb2 · 11.47:1
Use #ffffffAAA at every size.
Aa
White text · 11.47:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 1.83:1
AA fail · AA large fail · AAA fail
Reading the other direction: #021eb2 as text scores 11.47:1 on white and 1.83:1 on black.

Accessibility — WCAG contrast

Aa
#021eb2 on white: 11.47:1
AA ✓ pass · AA-large · AAA
Aa
#021eb2 on black: 1.83:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0042B6
deuteranopia · #0030B0
tritanopia · #004F6A

Color scale — 50 to 950

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

#F1F3FD
#E3E7FC
#C1CAFB
#90A1FE
#5973FD
#2144FD
#0329F2
#0222CA
#021eb2
#061874
#040F49
Base = 800Lightest = 50 · #F1F3FDDarkest = 950 · #040F49
:root {
  --brand-50: #F1F3FD;
  --brand-100: #E3E7FC;
  --brand-200: #C1CAFB;
  --brand-300: #90A1FE;
  --brand-400: #5973FD;
  --brand-500: #2144FD;
  --brand-600: #0329F2;
  --brand-700: #0222CA;
  --brand-800: #021eb2;
  --brand-900: #061874;
  --brand-950: #040F49;
  --brand: #021eb2;
  --brand-ink: #ffffff;
}

Colors that work with #021eb2

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#C0C7ED
Hairlines and dividers
Muted text#4B579B
Captions on the surface
Accent#B46B00
Second voice, not a rival
Dark variant#01157E
Hover, pressed, headers
Light variant#E6EAFF
Selected rows, tints
Dark surface#141624
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 #021eb2

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#B29602
Analogous left#0276B2
Analogous right#3E02B2
Split-complement 1#B23E02
Split-complement 2#76B202
Triadic 1#B2021E
Triadic 2#1EB202
Tetradic#B20276

RGB percentages

Red0.8%
Green11.8%
Blue69.8%

CMYK percentages

Cyan98.9%
Magenta83.1%
Yellow0.0%
Key (black)30.2%

Color previews

#021eb2 text on a black background

contrast 1.83:1

Card sample

#021eb2 text on a white background

contrast 11.47:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #021eb2;
Background color
Panel with #021eb2 background
background-color: #021eb2;
Text shadow — hex

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(2, 30, 178, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(2, 30, 178, 0.45);
Border & gradient
Gradient panel
border: 3px solid #021eb2;
background: linear-gradient(135deg, #021eb2, #5B02B2);

Monochromatic scale

Palettes built from #021eb2

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.

#021eb2 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.

#021eb2, answered

What color is #021eb2?

#021eb2 is a dark electric blue, closest to Medium Blue (ΔE2000 4.2). It sits at 231° on the hue wheel with 98% saturation and 35% lightness, which reads as cool.

What is the RGB value of #021eb2?

rgb(2, 30, 178) — 2 red, 30 green and 178 blue out of 255, or 0.8% / 11.8% / 69.8% by channel.

Is #021eb2 a light or a dark color?

It is a dark color. Relative luminance is 0.0416 and perceived brightness is 25%, so white text on it reaches 11.47:1.

Should I use black or white text on #021eb2?

White. It scores 11.47:1 against #021eb2, versus 1.83:1 for black — AAA at any size.

What is the complementary color of #021eb2?

#B29602 sits directly opposite on the wheel. Softer options are the split-complements #B23E02 and #76B202, which give the same contrast with far less vibration.

What colors go well with #021eb2?

For interface work: #F4F5FA as the surface, #C0C7ED for borders, #4B579B for secondary text, #B46B00 as an accent and #01157E for hover and pressed states. For a palette, the analogous pair #0276B2 and #3E02B2 stays calm, while #B29602 is the loudest partner.

What is #021eb2 in CMYK for printing?

cmyk(99%, 83%, 0%, 30%). 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 #021eb2 warm or cool?

Cool — it scores 89 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #2702B2; nudged cooler, #003AB4.

Work with #021eb2 in the Color Lab