Skip to content

#0c3fac

a dark, electric blue · cool · closest name: Dark Slate Blue

RGB
12, 63, 172
HSL
221°, 87%, 36%
CMYK
93, 63, 0, 33
Luminance
0.0661

At a glance

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

Hex
#0c3fac
Hue
221°
blue
Saturation
87%
electric
Lightness
36%
dark
Brightness
67%
HSV value
Perceived
30%
weighted brightness
Luminance
0.0661
WCAG relative
Temperature
Cool
94/100 cool
Color family
Blue
Tone
Electric
Best ink
White
9.04:1
Closest name
Dark Slate Blue
ΔE2000 8.7
Where it sits
Hue221° of 360°
Saturation87%
Lightness36%
Temperature
Warm ← → Cool94% 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#0c3fac
RGBrgb(12, 63, 172)
HSLhsl(221, 87%, 36%)
CMYKcmyk(93%, 63%, 0%, 33%)
LABlab(30.9 28.8 -62.1)
LCHlch(30.9 68.5 294.9)
OKLCHoklch(0.415 0.182 262.7)
Decimal802732
Display P3color(display-p3 0.047 0.247 0.675)

Copy-ready code

/* CSS */
color: #0c3fac;
background-color: #0c3fac;
/* Tailwind (arbitrary) */
class="text-[#0c3fac] bg-[#0c3fac]"
/* SCSS */
$brand: #0c3fac;
/* SwiftUI */
Color(red: 0.047, green: 0.247, blue: 0.675)
/* Android */
Color.parseColor("#0c3fac")
/* Flutter */
Color(0xFF0C3FAC)
/* Python / OpenCV (BGR) */
(172, 63, 12)

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

Accessibility — WCAG contrast

Aa
#0c3fac on white: 9.04:1
AA ✓ pass · AA-large · AAA
Aa
#0c3fac on black: 2.32:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0050B0
deuteranopia · #0042AA
tritanopia · #005C6F

Color scale — 50 to 950

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

#F2F5FD
#E5ECFA
#C4D5F7
#96B5F8
#6290F4
#2D6BF0
#1054E5
#0c3fac
#0B3899
#0C2B6E
#081B45
Base = 700Lightest = 50 · #F2F5FDDarkest = 950 · #081B45
:root {
  --brand-50: #F2F5FD;
  --brand-100: #E5ECFA;
  --brand-200: #C4D5F7;
  --brand-300: #96B5F8;
  --brand-400: #6290F4;
  --brand-500: #2D6BF0;
  --brand-600: #1054E5;
  --brand-700: #0c3fac;
  --brand-800: #0B3899;
  --brand-900: #0C2B6E;
  --brand-950: #081B45;
  --brand: #0c3fac;
  --brand-ink: #ffffff;
}

Colors that work with #0c3fac

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#F4F6FA
Tinted page background
Border#C0CEED
Hairlines and dividers
Muted text#4B649B
Captions on the surface
Accent#B05108
Second voice, not a rival
Dark variant#082C77
Hover, pressed, headers
Light variant#E7EEFD
Selected rows, tints
Dark surface#141924
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 #0c3fac

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#AC790C
Analogous left#0C8FAC
Analogous right#290CAC
Split-complement 1#AC290C
Split-complement 2#8FAC0C
Triadic 1#AC0C3F
Triadic 2#3FAC0C
Tetradic#AC0C8F

RGB percentages

Red4.7%
Green24.7%
Blue67.5%

CMYK percentages

Cyan93.0%
Magenta63.4%
Yellow0.0%
Key (black)32.5%

Color previews

#0c3fac text on a black background

contrast 2.32:1

Card sample

#0c3fac text on a white background

contrast 9.04:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #0c3fac;
Background color
Panel with #0c3fac background
background-color: #0c3fac;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #0c3fac;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(12, 63, 172, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(12, 63, 172, 0.45);
Border & gradient
Gradient panel
border: 3px solid #0c3fac;
background: linear-gradient(135deg, #0c3fac, #440CAC);

Monochromatic scale

Palettes built from #0c3fac

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.

#0c3fac 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.

#0c3fac, answered

What color is #0c3fac?

#0c3fac is a dark electric blue, closest to Dark Slate Blue (ΔE2000 8.7). It sits at 221° on the hue wheel with 87% saturation and 36% lightness, which reads as cool.

What is the RGB value of #0c3fac?

rgb(12, 63, 172) — 12 red, 63 green and 172 blue out of 255, or 4.7% / 24.7% / 67.5% by channel.

Is #0c3fac a light or a dark color?

It is a dark color. Relative luminance is 0.0661 and perceived brightness is 30%, so white text on it reaches 9.04:1.

Should I use black or white text on #0c3fac?

White. It scores 9.04:1 against #0c3fac, versus 2.32:1 for black — AAA at any size.

What is the complementary color of #0c3fac?

#AC790C sits directly opposite on the wheel. Softer options are the split-complements #AC290C and #8FAC0C, which give the same contrast with far less vibration.

What colors go well with #0c3fac?

For interface work: #F4F6FA as the surface, #C0CEED for borders, #4B649B for secondary text, #B05108 as an accent and #082C77 for hover and pressed states. For a palette, the analogous pair #0C8FAC and #290CAC stays calm, while #AC790C is the loudest partner.

What is #0c3fac in CMYK for printing?

cmyk(93%, 63%, 0%, 33%). 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 #0c3fac warm or cool?

Cool — it scores 94 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #140CAC; nudged cooler, #094196.

Work with #0c3fac in the Color Lab