#3040B2#3040B2

#3040B2 is a dark, vivid blue. Relative luminance 0.075; OKLCH L 43.5% C 0.180 H 270.6°. Best body text is #FFFFFF at 8.39:1 contrast (WCAG AA passes).

Color values

HEX#3040B2
RGBrgb(48, 64, 178)
HSLhsl(233, 58%, 44%)
HSVhsv(233, 73%, 70%)
CMYKcmyk(73%, 64%, 0%, 30.2%)
CIE-LABlab(32.94, 33.35, -62.33)
CIE-LCHlch(32.94, 70.70, 298.15°)
OKLaboklab(43.51% 0.0019 -0.1801)
OKLCHoklch(43.51% 0.18 270.6)
XYZxyz(11.0855, 7.5084, 42.9759)
Luminance0.0751 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#3040B2 #B2A230
analogous
#3081B2 #3040B2 #6130B2
triadic
#3040B2 #B23040 #40B230
tetradic
#3040B2 #B23081 #B2A230 #30B261
square
#3040B2 #B23081 #B2A230 #30B261
split-complementary
#3040B2 #B26130 #81B230
monochromatic
#161D52 #232F82 #3040B2 #505FD0 #808BDD

Accessibility & contrast

On white

8.39
#3040B2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.50
#3040B2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #3040B2
8.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##3040B2#FFFFFF#000000##FFFFFF
##3040B21.008.392.508.39
#FFFFFF8.391.0021.001.00
#0000002.5021.001.0021.00
##FFFFFF8.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0054B6
Deuteranopia (green-blind)
#0047B0
Tritanopia (blue-blind)
#005E73
Achromatopsia (no color)
#4D4D4D

Design tokens & code

CSS
--color: #3040b2;
/* rgb */ color: rgb(48, 64, 178);
/* oklch */ color: oklch(43.5% 0.180 270.6);
Tailwind
colors: {
  custom: {
    50: '#7b75ca',
    500: '#3040b2',
    950: '#000000',
  },
}
SCSS
$custom: #3040b2;
$custom-light: #7b75ca;
$custom-dark: #000000;
JSON
{
  "hex": "#3040b2",
  "rgb": {
    "r": 48,
    "g": 64,
    "b": 178
  },
  "hsl": {
    "h": 232.615,
    "s": 57.522,
    "l": 44.314
  },
  "oklch": {
    "l": 0.43514,
    "c": 0.18013,
    "h": 270.6
  },
  "luminance": 0.0751
}

Semantic roles & 50–950 ramp

primary
#3040B2
secondary
#C6BC78
accent
#CE47E1
background
#F8F7FC
surface
#EFEDF8
border
#CAC8D1
text
#0B0813
muted
#7C7B82

Preview Lab

Preview with #3040B2

Body copy rendered with the generated semantic roles for this colour.

Preview Lab → · Contrast checker → · Palette generator →

#3040B2 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva