Skip to content

#0c0166

a deep, electric blue · cool · closest name: Navy

RGB
12, 1, 102
HSL
247°, 98%, 20%
CMYK
88, 99, 0, 60
Luminance
0.0106

At a glance

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

Hex
#0c0166
Hue
247°
blue
Saturation
98%
electric
Lightness
20%
deep
Brightness
40%
HSV value
Perceived
14%
weighted brightness
Luminance
0.0106
WCAG relative
Temperature
Cool
80/100 cool
Color family
Blue
Tone
Electric
Best ink
White
17.33:1
Closest name
Navy
ΔE2000 3.9
Where it sits
Hue247° of 360°
Saturation98%
Lightness20%
Temperature
Warm ← → Cool80% 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#0c0166
RGBrgb(12, 1, 102)
HSLhsl(247, 98%, 20%)
CMYKcmyk(88%, 99%, 0%, 60%)
LABlab(9.5 40.1 -53.6)
LCHlch(9.5 67.0 306.8)
OKLCHoklch(0.238 0.155 269.6)
Decimal786790
Display P3color(display-p3 0.047 0.004 0.400)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#0c0166 on white: 17.33:1
AA ✓ pass · AA-large · AAA
Aa
#0c0166 on black: 1.21:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #001F68
deuteranopia · #001564
tritanopia · #002639

Color scale — 50 to 950

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

#F3F1FD
#E6E3FC
#C7C1FB
#9C90FE
#6A58FD
#3921FD
#1C02F2
#1802CA
#1302A2
#0c0166
#0B0449
Base = 900Lightest = 50 · #F3F1FDDarkest = 950 · #0B0449
:root {
  --brand-50: #F3F1FD;
  --brand-100: #E6E3FC;
  --brand-200: #C7C1FB;
  --brand-300: #9C90FE;
  --brand-400: #6A58FD;
  --brand-500: #3921FD;
  --brand-600: #1C02F2;
  --brand-700: #1802CA;
  --brand-800: #1302A2;
  --brand-900: #0c0166;
  --brand-950: #0B0449;
  --brand: #0c0166;
  --brand-ink: #ffffff;
}

Colors that work with #0c0166

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#534B9B
Captions on the surface
Accent#675800
Second voice, not a rival
Dark variant#0F017E
Hover, pressed, headers
Light variant#E8E6FF
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 #0c0166

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#5B6601
Analogous left#012966
Analogous right#3E0166
Split-complement 1#663E01
Split-complement 2#296601
Triadic 1#660C01
Triadic 2#01660C
Tetradic#660129

RGB percentages

Red4.7%
Green0.4%
Blue40.0%

CMYK percentages

Cyan88.2%
Magenta99.0%
Yellow0.0%
Key (black)60.0%

Color previews

#0c0166 text on a black background

contrast 1.21:1

Card sample

#0c0166 text on a white background

contrast 17.33:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #0c0166

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.

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

#0c0166, answered

What color is #0c0166?

#0c0166 is a deep electric blue, closest to Navy (ΔE2000 3.9). It sits at 247° on the hue wheel with 98% saturation and 20% lightness, which reads as cool.

What is the RGB value of #0c0166?

rgb(12, 1, 102) — 12 red, 1 green and 102 blue out of 255, or 4.7% / 0.4% / 40% by channel.

Is #0c0166 a light or a dark color?

It is a dark color. Relative luminance is 0.0106 and perceived brightness is 14%, so white text on it reaches 17.33:1.

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

White. It scores 17.33:1 against #0c0166, versus 1.21:1 for black — AAA at any size.

What is the complementary color of #0c0166?

#5B6601 sits directly opposite on the wheel. Softer options are the split-complements #663E01 and #296601, which give the same contrast with far less vibration.

What colors go well with #0c0166?

For interface work: #F5F4FA as the surface, #C5C0ED for borders, #534B9B for secondary text, #675800 as an accent and #0F017E for hover and pressed states. For a palette, the analogous pair #012966 and #3E0166 stays calm, while #5B6601 is the loudest partner.

What is #0c0166 in CMYK for printing?

cmyk(88%, 99%, 0%, 60%). 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 #0c0166 warm or cool?

Cool — it scores 80 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #310166; nudged cooler, #001B67.

Work with #0c0166 in the Color Lab