Skip to content

#0c4daf

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

RGB
12, 77, 175
HSL
216°, 87%, 37%
CMYK
93, 56, 0, 31
Luminance
0.0848

At a glance

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

Hex
#0c4daf
Hue
216°
blue
Saturation
87%
electric
Lightness
37%
dark
Brightness
69%
HSV value
Perceived
33%
weighted brightness
Luminance
0.0848
WCAG relative
Temperature
Cool
97/100 cool
Color family
Blue
Tone
Electric
Best ink
White
7.79:1
Closest name
Dark Slate Blue
ΔE2000 11.2
Where it sits
Hue216° of 360°
Saturation87%
Lightness37%
Temperature
Warm ← → Cool97% 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#0c4daf
RGBrgb(12, 77, 175)
HSLhsl(216, 87%, 37%)
CMYKcmyk(93%, 56%, 0%, 31%)
LABlab(35.0 20.6 -57.3)
LCHlch(35.0 60.9 289.7)
OKLCHoklch(0.446 0.168 259.8)
Decimal806319
Display P3color(display-p3 0.047 0.302 0.686)

Copy-ready code

/* CSS */
color: #0c4daf;
background-color: #0c4daf;
/* Tailwind (arbitrary) */
class="text-[#0c4daf] bg-[#0c4daf]"
/* SCSS */
$brand: #0c4daf;
/* SwiftUI */
Color(red: 0.047, green: 0.302, blue: 0.686)
/* Android */
Color.parseColor("#0c4daf")
/* Flutter */
Color(0xFF0C4DAF)
/* Python / OpenCV (BGR) */
(175, 77, 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 #0c4daf · 7.79:1
Use #ffffffAAA at every size.
Aa
White text · 7.79:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 2.70:1
AA fail · AA large fail · AAA fail
Reading the other direction: #0c4daf as text scores 7.79:1 on white and 2.70:1 on black.

Accessibility — WCAG contrast

Aa
#0c4daf on white: 7.79:1
AA ✓ pass · AA-large · AAA
Aa
#0c4daf on black: 2.70:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #005AB2
deuteranopia · #004BAD
tritanopia · #006676

Color scale — 50 to 950

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

#F2F6FD
#E5EEFA
#C4D9F7
#96BDF8
#619CF4
#2D7BF1
#1065E5
#0c4daf
#0A4399
#0C336E
#082045
Base = 700Lightest = 50 · #F2F6FDDarkest = 950 · #082045
:root {
  --brand-50: #F2F6FD;
  --brand-100: #E5EEFA;
  --brand-200: #C4D9F7;
  --brand-300: #96BDF8;
  --brand-400: #619CF4;
  --brand-500: #2D7BF1;
  --brand-600: #1065E5;
  --brand-700: #0c4daf;
  --brand-800: #0A4399;
  --brand-900: #0C336E;
  --brand-950: #082045;
  --brand: #0c4daf;
  --brand-ink: #ffffff;
}

Colors that work with #0c4daf

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#F4F7FA
Tinted page background
Border#C0D2ED
Hairlines and dividers
Muted text#4B6B9B
Captions on the surface
Accent#B34408
Second voice, not a rival
Dark variant#083477
Hover, pressed, headers
Light variant#E7F0FD
Selected rows, tints
Dark surface#141A24
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 #0c4daf

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#AF6E0C
Analogous left#0C9FAF
Analogous right#1D0CAF
Split-complement 1#AF1D0C
Split-complement 2#9FAF0C
Triadic 1#AF0C4D
Triadic 2#4DAF0C
Tetradic#AF0C9F

RGB percentages

Red4.7%
Green30.2%
Blue68.6%

CMYK percentages

Cyan93.1%
Magenta56.0%
Yellow0.0%
Key (black)31.4%

Color previews

#0c4daf text on a black background

contrast 2.70:1

Card sample

#0c4daf text on a white background

contrast 7.79:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(12, 77, 175, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(12, 77, 175, 0.45);
Border & gradient
Gradient panel
border: 3px solid #0c4daf;
background: linear-gradient(135deg, #0c4daf, #380CAF);

Monochromatic scale

Palettes built from #0c4daf

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.

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

#0c4daf, answered

What color is #0c4daf?

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

What is the RGB value of #0c4daf?

rgb(12, 77, 175) — 12 red, 77 green and 175 blue out of 255, or 4.7% / 30.2% / 68.6% by channel.

Is #0c4daf a light or a dark color?

It is a dark color. Relative luminance is 0.0848 and perceived brightness is 33%, so white text on it reaches 7.79:1.

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

White. It scores 7.79:1 against #0c4daf, versus 2.70:1 for black — AAA at any size.

What is the complementary color of #0c4daf?

#AF6E0C sits directly opposite on the wheel. Softer options are the split-complements #AF1D0C and #9FAF0C, which give the same contrast with far less vibration.

What colors go well with #0c4daf?

For interface work: #F4F7FA as the surface, #C0D2ED for borders, #4B6B9B for secondary text, #B34408 as an accent and #083477 for hover and pressed states. For a palette, the analogous pair #0C9FAF and #1D0CAF stays calm, while #AF6E0C is the loudest partner.

What is #0c4daf in CMYK for printing?

cmyk(93%, 56%, 0%, 31%). 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 #0c4daf warm or cool?

Cool — it scores 97 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #0C11AF; nudged cooler, #094899.

Work with #0c4daf in the Color Lab