Skip to content

#0c4cf2

a balanced, electric blue · cool · closest name: Royal Blue

RGB
12, 76, 242
HSL
223°, 91%, 50%
CMYK
95, 69, 0, 5
Luminance
0.1166

At a glance

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

Hex
#0c4cf2
Hue
223°
blue
Saturation
91%
electric
Lightness
50%
balanced
Brightness
95%
HSV value
Perceived
39%
weighted brightness
Luminance
0.1166
WCAG relative
Temperature
Cool
93/100 cool
Color family
Blue
Tone
Electric
Best ink
White
6.30:1
Closest name
Royal Blue
ΔE2000 9
Where it sits
Hue223° of 360°
Saturation91%
Lightness50%
Temperature
Warm ← → Cool93% 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#0c4cf2
RGBrgb(12, 76, 242)
HSLhsl(223, 91%, 50%)
CMYKcmyk(95%, 69%, 0%, 5%)
LABlab(40.7 46.9 -86.6)
LCHlch(40.7 98.5 298.4)
OKLCHoklch(0.507 0.253 263.6)
Decimal806130
Display P3color(display-p3 0.047 0.298 0.949)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#0c4cf2 on white: 6.30:1
AA ✓ pass · AA-large · AAA
Aa
#0c4cf2 on black: 3.33:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #006AF7
deuteranopia · #0055EF
tritanopia · #007B99

Color scale — 50 to 950

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

#F2F5FD
#E5EBFB
#C3D2F9
#94B0FA
#5F89F7
#2962F4
#0c4cf2
#0A3DC2
#08319C
#0A2770
#061846
Base = 600Lightest = 50 · #F2F5FDDarkest = 950 · #061846
:root {
  --brand-50: #F2F5FD;
  --brand-100: #E5EBFB;
  --brand-200: #C3D2F9;
  --brand-300: #94B0FA;
  --brand-400: #5F89F7;
  --brand-500: #2962F4;
  --brand-600: #0c4cf2;
  --brand-700: #0A3DC2;
  --brand-800: #08319C;
  --brand-900: #0A2770;
  --brand-950: #061846;
  --brand: #0c4cf2;
  --brand-ink: #ffffff;
}

Colors that work with #0c4cf2

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#C0CCED
Hairlines and dividers
Muted text#4B619B
Captions on the surface
Accent#C66106
Second voice, not a rival
Dark variant#06267A
Hover, pressed, headers
Light variant#E7EDFE
Selected rows, tints
Dark surface#141824
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 #0c4cf2

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
  • Brand accents, badges and data highlights
Use with care
  • Full-page backgrounds — tiring over long sessions
  • 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#F2B20C
Analogous left#0CBFF2
Analogous right#3F0CF2
Split-complement 1#F23F0C
Split-complement 2#BFF20C
Triadic 1#F20C4C
Triadic 2#4CF20C
Tetradic#F20CBF

RGB percentages

Red4.7%
Green29.8%
Blue94.9%

CMYK percentages

Cyan95.0%
Magenta68.6%
Yellow0.0%
Key (black)5.1%

Color previews

#0c4cf2 text on a black background

contrast 3.33:1

Card sample

#0c4cf2 text on a white background

contrast 6.30:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #0c4cf2

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.

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

#0c4cf2, answered

What color is #0c4cf2?

#0c4cf2 is a balanced electric blue, closest to Royal Blue (ΔE2000 9). It sits at 223° on the hue wheel with 91% saturation and 50% lightness, which reads as cool.

What is the RGB value of #0c4cf2?

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

Is #0c4cf2 a light or a dark color?

It is a dark color. Relative luminance is 0.1166 and perceived brightness is 39%, so white text on it reaches 6.30:1.

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

White. It scores 6.30:1 against #0c4cf2, versus 3.33:1 for black — AA at any size.

What is the complementary color of #0c4cf2?

#F2B20C sits directly opposite on the wheel. Softer options are the split-complements #F23F0C and #BFF20C, which give the same contrast with far less vibration.

What colors go well with #0c4cf2?

For interface work: #F4F6FA as the surface, #C0CCED for borders, #4B619B for secondary text, #C66106 as an accent and #06267A for hover and pressed states. For a palette, the analogous pair #0CBFF2 and #3F0CF2 stays calm, while #F2B20C is the loudest partner.

What is #0c4cf2 in CMYK for printing?

cmyk(95%, 69%, 0%, 5%). 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 #0c4cf2 warm or cool?

Cool — it scores 93 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #200CF2; nudged cooler, #0856DC.

Work with #0c4cf2 in the Color Lab