Skip to content

#0c034c

a deep, electric blue · cool · closest name: Midnight Blue

RGB
12, 3, 76
HSL
247°, 92%, 16%
CMYK
84, 96, 0, 70
Luminance
0.0067

At a glance

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

Hex
#0c034c
Hue
247°
blue
Saturation
92%
electric
Lightness
16%
deep
Brightness
30%
HSV value
Perceived
10%
weighted brightness
Luminance
0.0067
WCAG relative
Temperature
Cool
79/100 cool
Color family
Blue
Tone
Electric
Best ink
White
18.53:1
Closest name
Midnight Blue
ΔE2000 7.1
Where it sits
Hue247° of 360°
Saturation92%
Lightness16%
Temperature
Warm ← → Cool79% 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#0c034c
RGBrgb(12, 3, 76)
HSLhsl(247, 92%, 16%)
CMYKcmyk(84%, 96%, 0%, 70%)
LABlab(6.0 30.2 -41.7)
LCHlch(6.0 51.5 305.9)
OKLCHoklch(0.202 0.122 273.4)
Decimal787276
Display P3color(display-p3 0.047 0.012 0.298)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#0c034c on white: 18.53:1
AA ✓ pass · AA-large · AAA
Aa
#0c034c on black: 1.13:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #00174E
deuteranopia · #00104B
tritanopia · #001B29

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #0c034c is pinned to step 950; the rest hold its hue and let saturation ease off at the extremes so the pale end never turns neon.

#F3F2FD
#E7E4FB
#C9C3F9
#A093FB
#705DF9
#4127F6
#2509EB
#1F08C4
#19069D
#160971
#0c034c
Base = 950Lightest = 50 · #F3F2FDDarkest = 950 · #0c034c
:root {
  --brand-50: #F3F2FD;
  --brand-100: #E7E4FB;
  --brand-200: #C9C3F9;
  --brand-300: #A093FB;
  --brand-400: #705DF9;
  --brand-500: #4127F6;
  --brand-600: #2509EB;
  --brand-700: #1F08C4;
  --brand-800: #19069D;
  --brand-900: #160971;
  --brand-950: #0c034c;
  --brand: #0c034c;
  --brand-ink: #ffffff;
}

Colors that work with #0c034c

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#C5C0ED
Hairlines and dividers
Muted text#544B9B
Captions on the surface
Accent#4E4401
Second voice, not a rival
Dark variant#13057B
Hover, pressed, headers
Light variant#E9E6FE
Selected rows, tints
Dark surface#161424
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 #0c034c

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#434C03
Analogous left#031F4C
Analogous right#31034C
Split-complement 1#4C3103
Split-complement 2#1F4C03
Triadic 1#4C0C03
Triadic 2#034C0C
Tetradic#4C031F

RGB percentages

Red4.7%
Green1.2%
Blue29.8%

CMYK percentages

Cyan84.2%
Magenta96.1%
Yellow0.0%
Key (black)70.2%

Color previews

#0c034c text on a black background

contrast 1.13:1

Card sample

#0c034c text on a white background

contrast 18.53:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #0c034c

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.

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

#0c034c, answered

What color is #0c034c?

#0c034c is a deep electric blue, closest to Midnight Blue (ΔE2000 7.1). It sits at 247° on the hue wheel with 92% saturation and 16% lightness, which reads as cool.

What is the RGB value of #0c034c?

rgb(12, 3, 76) — 12 red, 3 green and 76 blue out of 255, or 4.7% / 1.2% / 29.8% by channel.

Is #0c034c a light or a dark color?

It is a dark color. Relative luminance is 0.0067 and perceived brightness is 10%, so white text on it reaches 18.53:1.

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

White. It scores 18.53:1 against #0c034c, versus 1.13:1 for black — AAA at any size.

What is the complementary color of #0c034c?

#434C03 sits directly opposite on the wheel. Softer options are the split-complements #4C3103 and #1F4C03, which give the same contrast with far less vibration.

What colors go well with #0c034c?

For interface work: #F5F4FA as the surface, #C5C0ED for borders, #544B9B for secondary text, #4E4401 as an accent and #13057B for hover and pressed states. For a palette, the analogous pair #031F4C and #31034C stays calm, while #434C03 is the loudest partner.

What is #0c034c in CMYK for printing?

cmyk(84%, 96%, 0%, 70%). 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 #0c034c warm or cool?

Cool — it scores 79 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #27034C; nudged cooler, #02144D.

Work with #0c034c in the Color Lab