Skip to content

#0340c2

a dark, electric blue · cool · closest name: Dark Slate Blue

RGB
3, 64, 194
HSL
221°, 97%, 39%
CMYK
99, 67, 0, 24
Luminance
0.0758

At a glance

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

Hex
#0340c2
Hue
221°
blue
Saturation
97%
electric
Lightness
39%
dark
Brightness
76%
HSV value
Perceived
32%
weighted brightness
Luminance
0.0758
WCAG relative
Temperature
Cool
94/100 cool
Color family
Blue
Tone
Electric
Best ink
White
8.35:1
Closest name
Dark Slate Blue
ΔE2000 10.1
Where it sits
Hue221° of 360°
Saturation97%
Lightness39%
Temperature
Warm ← → Cool94% 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#0340c2
RGBrgb(3, 64, 194)
HSLhsl(221, 97%, 39%)
CMYKcmyk(99%, 67%, 0%, 24%)
LABlab(33.1 36.5 -71.6)
LCHlch(33.1 80.3 297.0)
OKLCHoklch(0.437 0.209 262.7)
Decimal213186
Display P3color(display-p3 0.012 0.251 0.761)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#0340c2 on white: 8.35:1
AA ✓ pass · AA-large · AAA
Aa
#0340c2 on black: 2.52:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0056C6
deuteranopia · #0045C0
tritanopia · #00647B

Color scale — 50 to 950

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

#F1F5FD
#E4EBFC
#C1D3FB
#90B3FD
#598DFC
#2268FC
#0450F1
#0340c2
#0235A1
#072A74
#041A48
Base = 700Lightest = 50 · #F1F5FDDarkest = 950 · #041A48
:root {
  --brand-50: #F1F5FD;
  --brand-100: #E4EBFC;
  --brand-200: #C1D3FB;
  --brand-300: #90B3FD;
  --brand-400: #598DFC;
  --brand-500: #2268FC;
  --brand-600: #0450F1;
  --brand-700: #0340c2;
  --brand-800: #0235A1;
  --brand-900: #072A74;
  --brand-950: #041A48;
  --brand: #0340c2;
  --brand-ink: #ffffff;
}

Colors that work with #0340c2

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#C0CEED
Hairlines and dividers
Muted text#4B649B
Captions on the surface
Accent#C55500
Second voice, not a rival
Dark variant#02297E
Hover, pressed, headers
Light variant#E6EEFF
Selected rows, tints
Dark surface#141924
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 #0340c2

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#C28503
Analogous left#03A0C2
Analogous right#2503C2
Split-complement 1#C22503
Split-complement 2#A0C203
Triadic 1#C20340
Triadic 2#40C203
Tetradic#C203A0

RGB percentages

Red1.2%
Green25.1%
Blue76.1%

CMYK percentages

Cyan98.5%
Magenta67.0%
Yellow0.0%
Key (black)23.9%

Color previews

#0340c2 text on a black background

contrast 2.52:1

Card sample

#0340c2 text on a white background

contrast 8.35:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #0340c2;
Background color
Panel with #0340c2 background
background-color: #0340c2;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #0340c2;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(3, 64, 194, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(3, 64, 194, 0.45);
Border & gradient
Gradient panel
border: 3px solid #0340c2;
background: linear-gradient(135deg, #0340c2, #4503C2);

Monochromatic scale

Palettes built from #0340c2

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.

#0340c2 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.

#0340c2, answered

What color is #0340c2?

#0340c2 is a dark electric blue, closest to Dark Slate Blue (ΔE2000 10.1). It sits at 221° on the hue wheel with 97% saturation and 39% lightness, which reads as cool.

What is the RGB value of #0340c2?

rgb(3, 64, 194) — 3 red, 64 green and 194 blue out of 255, or 1.2% / 25.1% / 76.1% by channel.

Is #0340c2 a light or a dark color?

It is a dark color. Relative luminance is 0.0758 and perceived brightness is 32%, so white text on it reaches 8.35:1.

Should I use black or white text on #0340c2?

White. It scores 8.35:1 against #0340c2, versus 2.52:1 for black — AAA at any size.

What is the complementary color of #0340c2?

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

What colors go well with #0340c2?

For interface work: #F4F6FA as the surface, #C0CEED for borders, #4B649B for secondary text, #C55500 as an accent and #02297E for hover and pressed states. For a palette, the analogous pair #03A0C2 and #2503C2 stays calm, while #C28503 is the loudest partner.

What is #0340c2 in CMYK for printing?

cmyk(99%, 67%, 0%, 24%). 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 #0340c2 warm or cool?

Cool — it scores 94 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #0C03C2; nudged cooler, #0144AB.

Work with #0340c2 in the Color Lab