Skip to content

#021bba

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

RGB
2, 27, 186
HSL
232°, 98%, 37%
CMYK
99, 86, 0, 27
Luminance
0.0434

At a glance

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

Hex
#021bba
Hue
232°
blue
Saturation
98%
electric
Lightness
37%
dark
Brightness
73%
HSV value
Perceived
26%
weighted brightness
Luminance
0.0434
WCAG relative
Temperature
Cool
88/100 cool
Color family
Blue
Tone
Electric
Best ink
White
11.24:1
Closest name
Medium Blue
ΔE2000 3.1
Where it sits
Hue232° of 360°
Saturation98%
Lightness37%
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#021bba
RGBrgb(2, 27, 186)
HSLhsl(232, 98%, 37%)
CMYKcmyk(99%, 86%, 0%, 27%)
LABlab(24.8 54.5 -80.6)
LCHlch(24.8 97.3 304.0)
OKLCHoklch(0.375 0.235 264.4)
Decimal138170
Display P3color(display-p3 0.008 0.106 0.729)

Copy-ready code

/* CSS */
color: #021bba;
background-color: #021bba;
/* Tailwind (arbitrary) */
class="text-[#021bba] bg-[#021bba]"
/* SCSS */
$brand: #021bba;
/* SwiftUI */
Color(red: 0.008, green: 0.106, blue: 0.729)
/* Android */
Color.parseColor("#021bba")
/* Flutter */
Color(0xFF021BBA)
/* Python / OpenCV (BGR) */
(186, 27, 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 #021bba · 11.24:1
Use #ffffffAAA at every size.
Aa
White text · 11.24: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: #021bba as text scores 11.24:1 on white and 1.87:1 on black.

Accessibility — WCAG contrast

Aa
#021bba on white: 11.24:1
AA ✓ pass · AA-large · AAA
Aa
#021bba on black: 1.87:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0044BE
deuteranopia · #0031B7
tritanopia · #00516E

Color scale — 50 to 950

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

#F1F3FD
#E3E7FC
#C1C9FB
#909FFE
#586FFD
#213FFD
#0323F2
#021bba
#0218A1
#061574
#040D49
Base = 700Lightest = 50 · #F1F3FDDarkest = 950 · #040D49
:root {
  --brand-50: #F1F3FD;
  --brand-100: #E3E7FC;
  --brand-200: #C1C9FB;
  --brand-300: #909FFE;
  --brand-400: #586FFD;
  --brand-500: #213FFD;
  --brand-600: #0323F2;
  --brand-700: #021bba;
  --brand-800: #0218A1;
  --brand-900: #061574;
  --brand-950: #040D49;
  --brand: #021bba;
  --brand-ink: #ffffff;
}

Colors that work with #021bba

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#BC7300
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 #021bba

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#BAA102
Analogous left#0277BA
Analogous right#4502BA
Split-complement 1#BA4502
Split-complement 2#77BA02
Triadic 1#BA021B
Triadic 2#1BBA02
Tetradic#BA0277

RGB percentages

Red0.8%
Green10.6%
Blue72.9%

CMYK percentages

Cyan98.9%
Magenta85.5%
Yellow0.0%
Key (black)27.1%

Color previews

#021bba text on a black background

contrast 1.87:1

Card sample

#021bba text on a white background

contrast 11.24:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(2, 27, 186, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(2, 27, 186, 0.45);
Border & gradient
Gradient panel
border: 3px solid #021bba;
background: linear-gradient(135deg, #021bba, #6402BA);

Monochromatic scale

Palettes built from #021bba

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.

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

#021bba, answered

What color is #021bba?

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

What is the RGB value of #021bba?

rgb(2, 27, 186) — 2 red, 27 green and 186 blue out of 255, or 0.8% / 10.6% / 72.9% by channel.

Is #021bba a light or a dark color?

It is a dark color. Relative luminance is 0.0434 and perceived brightness is 26%, so white text on it reaches 11.24:1.

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

White. It scores 11.24:1 against #021bba, versus 1.87:1 for black — AAA at any size.

What is the complementary color of #021bba?

#BAA102 sits directly opposite on the wheel. Softer options are the split-complements #BA4502 and #77BA02, which give the same contrast with far less vibration.

What colors go well with #021bba?

For interface work: #F4F5FA as the surface, #C0C6ED for borders, #4B569B for secondary text, #BC7300 as an accent and #01127E for hover and pressed states. For a palette, the analogous pair #0277BA and #4502BA stays calm, while #BAA102 is the loudest partner.

What is #021bba in CMYK for printing?

cmyk(99%, 86%, 0%, 27%). 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 #021bba 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 #2C02BA; nudged cooler, #003ABC.

Work with #021bba in the Color Lab