Skip to content

#2012cb

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

RGB
32, 18, 203
HSL
245°, 84%, 43%
CMYK
84, 91, 0, 20
Luminance
0.0505

At a glance

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

Hex
#2012cb
Hue
245°
blue
Saturation
84%
electric
Lightness
43%
dark
Brightness
80%
HSV value
Perceived
28%
weighted brightness
Luminance
0.0505
WCAG relative
Temperature
Cool
81/100 cool
Color family
Blue
Tone
Electric
Best ink
White
10.45:1
Closest name
Medium Blue
ΔE2000 1.7
Where it sits
Hue245° of 360°
Saturation84%
Lightness43%
Temperature
Warm ← → Cool81% 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#2012cb
RGBrgb(32, 18, 203)
HSLhsl(245, 84%, 43%)
CMYKcmyk(84%, 91%, 0%, 20%)
LABlab(26.9 63.1 -87.1)
LCHlch(26.9 107.6 305.9)
OKLCHoklch(0.398 0.252 268.9)
Decimal2101963
Display P3color(display-p3 0.125 0.071 0.796)

Copy-ready code

/* CSS */
color: #2012cb;
background-color: #2012cb;
/* Tailwind (arbitrary) */
class="text-[#2012cb] bg-[#2012cb]"
/* SCSS */
$brand: #2012cb;
/* SwiftUI */
Color(red: 0.125, green: 0.071, blue: 0.796)
/* Android */
Color.parseColor("#2012cb")
/* Flutter */
Color(0xFF2012CB)
/* Python / OpenCV (BGR) */
(203, 18, 32)

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

Accessibility — WCAG contrast

Aa
#2012cb on white: 10.45:1
AA ✓ pass · AA-large · AAA
Aa
#2012cb on black: 2.01:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0048D0
deuteranopia · #0036C8
tritanopia · #005677

Color scale — 50 to 950

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

#F3F2FC
#E7E6FA
#C9C5F6
#9F98F6
#6F64F1
#3F31ED
#2314E1
#2012cb
#180D96
#150E6C
#0D0944
Base = 700Lightest = 50 · #F3F2FCDarkest = 950 · #0D0944
:root {
  --brand-50: #F3F2FC;
  --brand-100: #E7E6FA;
  --brand-200: #C9C5F6;
  --brand-300: #9F98F6;
  --brand-400: #6F64F1;
  --brand-500: #3F31ED;
  --brand-600: #2314E1;
  --brand-700: #2012cb;
  --brand-800: #180D96;
  --brand-900: #150E6C;
  --brand-950: #0D0944;
  --brand: #2012cb;
  --brand-ink: #ffffff;
}

Colors that work with #2012cb

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#F5F4FA
Tinted page background
Border#C3C0ED
Hairlines and dividers
Muted text#514B9B
Captions on the surface
Accent#BFA00D
Second voice, not a rival
Dark variant#120A75
Hover, pressed, headers
Light variant#E9E8FD
Selected rows, tints
Dark surface#151424
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 #2012cb

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#BDCB12
Analogous left#1261CB
Analogous right#7C12CB
Split-complement 1#CB7C12
Split-complement 2#61CB12
Triadic 1#CB2012
Triadic 2#12CB20
Tetradic#CB1261

RGB percentages

Red12.5%
Green7.1%
Blue79.6%

CMYK percentages

Cyan84.2%
Magenta91.1%
Yellow0.0%
Key (black)20.4%

Color previews

#2012cb text on a black background

contrast 2.01:1

Card sample

#2012cb text on a white background

contrast 10.45:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #2012cb;
Background color
Panel with #2012cb background
background-color: #2012cb;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #2012cb;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(32, 18, 203, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(32, 18, 203, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2012cb;
background: linear-gradient(135deg, #2012cb, #9B12CB);

Monochromatic scale

Palettes built from #2012cb

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.

#2012cb 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.

#2012cb, answered

What color is #2012cb?

#2012cb is a dark electric blue, closest to Medium Blue (ΔE2000 1.7). It sits at 245° on the hue wheel with 84% saturation and 43% lightness, which reads as cool.

What is the RGB value of #2012cb?

rgb(32, 18, 203) — 32 red, 18 green and 203 blue out of 255, or 12.5% / 7.1% / 79.6% by channel.

Is #2012cb a light or a dark color?

It is a dark color. Relative luminance is 0.0505 and perceived brightness is 28%, so white text on it reaches 10.45:1.

Should I use black or white text on #2012cb?

White. It scores 10.45:1 against #2012cb, versus 2.01:1 for black — AAA at any size.

What is the complementary color of #2012cb?

#BDCB12 sits directly opposite on the wheel. Softer options are the split-complements #CB7C12 and #61CB12, which give the same contrast with far less vibration.

What colors go well with #2012cb?

For interface work: #F5F4FA as the surface, #C3C0ED for borders, #514B9B for secondary text, #BFA00D as an accent and #120A75 for hover and pressed states. For a palette, the analogous pair #1261CB and #7C12CB stays calm, while #BDCB12 is the loudest partner.

What is #2012cb in CMYK for printing?

cmyk(84%, 91%, 0%, 20%). 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 #2012cb warm or cool?

Cool — it scores 81 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #6412CB; nudged cooler, #1038CD.

Work with #2012cb in the Color Lab