Skip to content

#021ab2

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

RGB
2, 26, 178
HSL
232°, 98%, 35%
CMYK
99, 85, 0, 30
Luminance
0.0397

At a glance

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

Hex
#021ab2
Hue
232°
blue
Saturation
98%
electric
Lightness
35%
dark
Brightness
70%
HSV value
Perceived
25%
weighted brightness
Luminance
0.0397
WCAG relative
Temperature
Cool
88/100 cool
Color family
Blue
Tone
Electric
Best ink
White
11.71:1
Closest name
Medium Blue
ΔE2000 3.8
Where it sits
Hue232° of 360°
Saturation98%
Lightness35%
Temperature
Warm ← → Cool88% 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#021ab2
RGBrgb(2, 26, 178)
HSLhsl(232, 98%, 35%)
CMYKcmyk(99%, 85%, 0%, 30%)
LABlab(23.6 52.5 -77.9)
LCHlch(23.6 93.9 304.0)
OKLCHoklch(0.363 0.227 264.5)
Decimal137906
Display P3color(display-p3 0.008 0.102 0.698)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#021ab2 on white: 11.71:1
AA ✓ pass · AA-large · AAA
Aa
#021ab2 on black: 1.79:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0041B6
deuteranopia · #002FB0
tritanopia · #004E69

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #021ab2 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
#C1C9FB
#909FFE
#596FFD
#213FFD
#0323F2
#021ECA
#021ab2
#061574
#040D49
Base = 800Lightest = 50 · #F1F3FDDarkest = 950 · #040D49
:root {
  --brand-50: #F1F3FD;
  --brand-100: #E3E7FC;
  --brand-200: #C1C9FB;
  --brand-300: #909FFE;
  --brand-400: #596FFD;
  --brand-500: #213FFD;
  --brand-600: #0323F2;
  --brand-700: #021ECA;
  --brand-800: #021ab2;
  --brand-900: #061574;
  --brand-950: #040D49;
  --brand: #021ab2;
  --brand-ink: #ffffff;
}

Colors that work with #021ab2

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#C0C6ED
Hairlines and dividers
Muted text#4B569B
Captions on the surface
Accent#B46E00
Second voice, not a rival
Dark variant#01127E
Hover, pressed, headers
Light variant#E6E9FF
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 #021ab2

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#B29A02
Analogous left#0272B2
Analogous right#4202B2
Split-complement 1#B24202
Split-complement 2#72B202
Triadic 1#B2021A
Triadic 2#1AB202
Tetradic#B20272

RGB percentages

Red0.8%
Green10.2%
Blue69.8%

CMYK percentages

Cyan98.9%
Magenta85.4%
Yellow0.0%
Key (black)30.2%

Color previews

#021ab2 text on a black background

contrast 1.79:1

Card sample

#021ab2 text on a white background

contrast 11.71:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #021ab2

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.

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

#021ab2, answered

What color is #021ab2?

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

What is the RGB value of #021ab2?

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

Is #021ab2 a light or a dark color?

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

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

White. It scores 11.71:1 against #021ab2, versus 1.79:1 for black — AAA at any size.

What is the complementary color of #021ab2?

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

What colors go well with #021ab2?

For interface work: #F4F5FA as the surface, #C0C6ED for borders, #4B569B for secondary text, #B46E00 as an accent and #01127E for hover and pressed states. For a palette, the analogous pair #0272B2 and #4202B2 stays calm, while #B29A02 is the loudest partner.

What is #021ab2 in CMYK for printing?

cmyk(99%, 85%, 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 #021ab2 warm or cool?

Cool — it scores 88 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #2A02B2; nudged cooler, #0038B4.

Work with #021ab2 in the Color Lab