Skip to content

#0f5fd7

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

RGB
15, 95, 215
HSL
216°, 87%, 45%
CMYK
93, 56, 0, 16
Luminance
0.1319

At a glance

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

Hex
#0f5fd7
Hue
216°
blue
Saturation
87%
electric
Lightness
45%
balanced
Brightness
84%
HSV value
Perceived
40%
weighted brightness
Luminance
0.1319
WCAG relative
Temperature
Cool
97/100 cool
Color family
Blue
Tone
Electric
Best ink
White
5.77:1
Closest name
Royal Blue
ΔE2000 4.9
Where it sits
Hue216° of 360°
Saturation87%
Lightness45%
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#0f5fd7
RGBrgb(15, 95, 215)
HSLhsl(216, 87%, 45%)
CMYKcmyk(93%, 56%, 0%, 16%)
LABlab(43.0 24.7 -67.4)
LCHlch(43.0 71.8 290.1)
OKLCHoklch(0.517 0.198 259.9)
Decimal1007575
Display P3color(display-p3 0.059 0.373 0.843)

Copy-ready code

/* CSS */
color: #0f5fd7;
background-color: #0f5fd7;
/* Tailwind (arbitrary) */
class="text-[#0f5fd7] bg-[#0f5fd7]"
/* SCSS */
$brand: #0f5fd7;
/* SwiftUI */
Color(red: 0.059, green: 0.373, blue: 0.843)
/* Android */
Color.parseColor("#0f5fd7")
/* Flutter */
Color(0xFF0F5FD7)
/* Python / OpenCV (BGR) */
(215, 95, 15)

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 #0f5fd7 · 5.77:1
Use #ffffffAA at every size, AAA for large text only.
Aa
White text · 5.77:1 · recommended
AA pass · AA large pass · AAA fail
Aa
Black text · 3.64:1
AA fail · AA large pass · AAA fail
Reading the other direction: #0f5fd7 as text scores 5.77:1 on white and 3.64:1 on black.

Accessibility — WCAG contrast

Aa
#0f5fd7 on white: 5.77:1
AA ✓ pass · AA-large · AAA
Aa
#0f5fd7 on black: 3.64:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #006FDB
deuteranopia · #005DD5
tritanopia · #007D92

Color scale — 50 to 950

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

#F2F6FD
#E5EEFA
#C4D9F7
#96BDF8
#629CF4
#2D7BF0
#0f5fd7
#0D54BF
#0B4399
#0C336E
#082045
Base = 600Lightest = 50 · #F2F6FDDarkest = 950 · #082045
:root {
  --brand-50: #F2F6FD;
  --brand-100: #E5EEFA;
  --brand-200: #C4D9F7;
  --brand-300: #96BDF8;
  --brand-400: #629CF4;
  --brand-500: #2D7BF0;
  --brand-600: #0f5fd7;
  --brand-700: #0D54BF;
  --brand-800: #0B4399;
  --brand-900: #0C336E;
  --brand-950: #082045;
  --brand: #0f5fd7;
  --brand-ink: #ffffff;
}

Colors that work with #0f5fd7

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#DC540A
Second voice, not a rival
Dark variant#083577
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 #0f5fd7

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#D7870F
Analogous left#0FC3D7
Analogous right#230FD7
Split-complement 1#D7230F
Split-complement 2#C3D70F
Triadic 1#D70F5F
Triadic 2#5FD70F
Tetradic#D70FC3

RGB percentages

Red5.9%
Green37.3%
Blue84.3%

CMYK percentages

Cyan93.0%
Magenta55.8%
Yellow0.0%
Key (black)15.7%

Color previews

#0f5fd7 text on a black background

contrast 3.64:1

Card sample

#0f5fd7 text on a white background

contrast 5.77:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(15, 95, 215, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(15, 95, 215, 0.45);
Border & gradient
Gradient panel
border: 3px solid #0f5fd7;
background: linear-gradient(135deg, #0f5fd7, #440FD7);

Monochromatic scale

Palettes built from #0f5fd7

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.

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

#0f5fd7, answered

What color is #0f5fd7?

#0f5fd7 is a balanced electric blue, closest to Royal Blue (ΔE2000 4.9). It sits at 216° on the hue wheel with 87% saturation and 45% lightness, which reads as cool.

What is the RGB value of #0f5fd7?

rgb(15, 95, 215) — 15 red, 95 green and 215 blue out of 255, or 5.9% / 37.3% / 84.3% by channel.

Is #0f5fd7 a light or a dark color?

It is a dark color. Relative luminance is 0.1319 and perceived brightness is 40%, so white text on it reaches 5.77:1.

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

White. It scores 5.77:1 against #0f5fd7, versus 3.64:1 for black — AA at any size.

What is the complementary color of #0f5fd7?

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

What colors go well with #0f5fd7?

For interface work: #F4F7FA as the surface, #C0D2ED for borders, #4B6B9B for secondary text, #DC540A as an accent and #083577 for hover and pressed states. For a palette, the analogous pair #0FC3D7 and #230FD7 stays calm, while #D7870F is the loudest partner.

What is #0f5fd7 in CMYK for printing?

cmyk(93%, 56%, 0%, 16%). 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 #0f5fd7 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 #0F16D7; nudged cooler, #0B5AC1.

Work with #0f5fd7 in the Color Lab