#3040B4#3040B4

#3040B4 is a dark, vivid blue. Relative luminance 0.076; OKLCH L 43.7% C 0.183 H 270.6°. Best body text is #FFFFFF at 8.34:1 contrast (WCAG AA passes).

Color values

HEX#3040B4
RGBrgb(48, 64, 180)
HSLhsl(233, 58%, 45%)
HSVhsv(233, 73%, 71%)
CMYKcmyk(73.3%, 64.4%, 0%, 29.4%)
CIE-LABlab(33.11, 34.08, -63.23)
CIE-LCHlch(33.11, 71.83, 298.32°)
OKLaboklab(43.7% 0.0018 -0.1828)
OKLCHoklch(43.7% 0.183 270.6)
XYZxyz(11.2877, 7.5893, 44.0412)
Luminance0.0759 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#3040B4 #B4A430
analogous
#3082B4 #3040B4 #6230B4
triadic
#3040B4 #B43040 #40B430
tetradic
#3040B4 #B43082 #B4A430 #30B462
square
#3040B4 #B43082 #B4A430 #30B462
split-complementary
#3040B4 #B46230 #82B430
monochromatic
#161E53 #232F84 #3040B4 #5160D1 #818CDD

Accessibility & contrast

On white

8.34
#3040B4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.52
#3040B4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #3040B4
8.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##3040B4#FFFFFF#000000##FFFFFF
##3040B41.008.342.528.34
#FFFFFF8.341.0021.001.00
#0000002.5221.001.0021.00
##FFFFFF8.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0054B8
Deuteranopia (green-blind)
#0048B2
Tritanopia (blue-blind)
#005E74
Achromatopsia (no color)
#4E4E4E

Design tokens & code

CSS
--color: #3040b4;
/* rgb */ color: rgb(48, 64, 180);
/* oklch */ color: oklch(43.7% 0.183 270.6);
Tailwind
colors: {
  custom: {
    50: '#7c75cb',
    500: '#3040b4',
    950: '#000000',
  },
}
SCSS
$custom: #3040b4;
$custom-light: #7c75cb;
$custom-dark: #000000;
JSON
{
  "hex": "#3040b4",
  "rgb": {
    "r": 48,
    "g": 64,
    "b": 180
  },
  "hsl": {
    "h": 232.727,
    "s": 57.895,
    "l": 44.706
  },
  "oklch": {
    "l": 0.43696,
    "c": 0.18277,
    "h": 270.6
  },
  "luminance": 0.0759
}

Semantic roles & 50–950 ramp

primary
#3040B4
secondary
#C6BD79
accent
#CE47E1
background
#F8F7FC
surface
#EFEDF9
border
#CAC8D2
text
#0B0813
muted
#7C7B82

Preview Lab

Preview with #3040B4

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

Preview Lab → · Contrast checker → · Palette generator →

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