Skip to content

#03115d

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

RGB
3, 17, 93
HSL
231°, 94%, 19%
CMYK
97, 82, 0, 64
Luminance
0.0121

At a glance

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

Hex
#03115d
Hue
231°
blue
Saturation
94%
electric
Lightness
19%
deep
Brightness
36%
HSV value
Perceived
13%
weighted brightness
Luminance
0.0121
WCAG relative
Temperature
Cool
88/100 cool
Color family
Blue
Tone
Electric
Best ink
White
16.91:1
Closest name
Midnight Blue
ΔE2000 3.7
Where it sits
Hue231° of 360°
Saturation94%
Lightness19%
Temperature
Warm ← → Cool88% 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#03115d
RGBrgb(3, 17, 93)
HSLhsl(231, 94%, 19%)
CMYKcmyk(97%, 82%, 0%, 64%)
LABlab(10.6 28.0 -45.7)
LCHlch(10.6 53.6 301.5)
OKLCHoklch(0.241 0.133 265.2)
Decimal201053
Display P3color(display-p3 0.012 0.067 0.365)

Copy-ready code

/* CSS */
color: #03115d;
background-color: #03115d;
/* Tailwind (arbitrary) */
class="text-[#03115d] bg-[#03115d]"
/* SCSS */
$brand: #03115d;
/* SwiftUI */
Color(red: 0.012, green: 0.067, blue: 0.365)
/* Android */
Color.parseColor("#03115d")
/* Flutter */
Color(0xFF03115D)
/* Python / OpenCV (BGR) */
(93, 17, 3)

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

Accessibility — WCAG contrast

Aa
#03115d on white: 16.91:1
AA ✓ pass · AA-large · AAA
Aa
#03115d on black: 1.24:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #00215F
deuteranopia · #00185C
tritanopia · #002836

Color scale — 50 to 950

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

#F2F3FD
#E4E8FB
#C2CBFA
#92A3FB
#5C74FA
#2646F8
#082BED
#0624C6
#051D9E
#081972
#03115d
Base = 950Lightest = 50 · #F2F3FDDarkest = 950 · #03115d
:root {
  --brand-50: #F2F3FD;
  --brand-100: #E4E8FB;
  --brand-200: #C2CBFA;
  --brand-300: #92A3FB;
  --brand-400: #5C74FA;
  --brand-500: #2646F8;
  --brand-600: #082BED;
  --brand-700: #0624C6;
  --brand-800: #051D9E;
  --brand-900: #081972;
  --brand-950: #03115d;
  --brand: #03115d;
  --brand-ink: #ffffff;
}

Colors that work with #03115d

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#F4F5FA
Tinted page background
Border#C0C7ED
Hairlines and dividers
Muted text#4B579B
Captions on the surface
Accent#5F3901
Second voice, not a rival
Dark variant#04177B
Hover, pressed, headers
Light variant#E6EAFE
Selected rows, tints
Dark surface#141624
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 #03115d

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#5D4F03
Analogous left#033E5D
Analogous right#22035D
Split-complement 1#5D2203
Split-complement 2#3E5D03
Triadic 1#5D0311
Triadic 2#115D03
Tetradic#5D033E

RGB percentages

Red1.2%
Green6.7%
Blue36.5%

CMYK percentages

Cyan96.8%
Magenta81.7%
Yellow0.0%
Key (black)63.5%

Color previews

#03115d text on a black background

contrast 1.24:1

Card sample

#03115d text on a white background

contrast 16.91:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #03115d;
Background color
Panel with #03115d background
background-color: #03115d;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #03115d;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(3, 17, 93, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(3, 17, 93, 0.45);
Border & gradient
Gradient panel
border: 3px solid #03115d;
background: linear-gradient(135deg, #03115d, #31035D);

Monochromatic scale

Palettes built from #03115d

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.

#03115d 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.

#03115d, answered

What color is #03115d?

#03115d is a deep electric blue, closest to Midnight Blue (ΔE2000 3.7). It sits at 231° on the hue wheel with 94% saturation and 19% lightness, which reads as cool.

What is the RGB value of #03115d?

rgb(3, 17, 93) — 3 red, 17 green and 93 blue out of 255, or 1.2% / 6.7% / 36.5% by channel.

Is #03115d a light or a dark color?

It is a dark color. Relative luminance is 0.0121 and perceived brightness is 13%, so white text on it reaches 16.91:1.

Should I use black or white text on #03115d?

White. It scores 16.91:1 against #03115d, versus 1.24:1 for black — AAA at any size.

What is the complementary color of #03115d?

#5D4F03 sits directly opposite on the wheel. Softer options are the split-complements #5D2203 and #3E5D03, which give the same contrast with far less vibration.

What colors go well with #03115d?

For interface work: #F4F5FA as the surface, #C0C7ED for borders, #4B579B for secondary text, #5F3901 as an accent and #04177B for hover and pressed states. For a palette, the analogous pair #033E5D and #22035D stays calm, while #5D4F03 is the loudest partner.

What is #03115d in CMYK for printing?

cmyk(97%, 82%, 0%, 64%). 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 #03115d warm or cool?

Cool — it scores 88 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #16035D; nudged cooler, #02245E.

Work with #03115d in the Color Lab