#334EA1#334EA1

#334EA1 is a mid, vivid blue. Relative luminance 0.087; OKLCH L 45.0% C 0.138 H 267.1°. Best body text is #FFFFFF at 7.65:1 contrast (WCAG AA passes).

Color values

HEX#334EA1
RGBrgb(51, 78, 161)
HSLhsl(225, 52%, 42%)
HSVhsv(225, 68%, 63%)
CMYKcmyk(68.3%, 51.6%, 0%, 36.9%)
CIE-LABlab(35.45, 18.31, -48.09)
CIE-LCHlch(35.45, 51.46, 290.84°)
OKLaboklab(45.02% -0.0069 -0.138)
OKLCHoklch(45.02% 0.138 267.1)
XYZxyz(10.5204, 8.7248, 34.8409)
Luminance0.0873 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#334EA1 #A18633
analogous
#3385A1 #334EA1 #4F33A1
triadic
#334EA1 #A1334E #4EA133
tetradic
#334EA1 #A13385 #A18633 #33A14F
square
#334EA1 #A13385 #A18633 #33A14F
split-complementary
#334EA1 #A14F33 #85A133
monochromatic
#162144 #243773 #334EA1 #4B69C6 #7A90D5

Accessibility & contrast

On white

7.65
#334EA1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.75
#334EA1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #334EA1
7.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##334EA1#FFFFFF#000000##FFFFFF
##334EA11.007.652.757.65
#FFFFFF7.651.0021.001.00
#0000002.7521.001.0021.00
##FFFFFF7.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1D59A4
Deuteranopia (green-blind)
#004F9F
Tritanopia (blue-blind)
#006270
Achromatopsia (no color)
#535353

Design tokens & code

CSS
--color: #334ea1;
/* rgb */ color: rgb(51, 78, 161);
/* oklch */ color: oklch(45.0% 0.138 267.1);
Tailwind
colors: {
  custom: {
    50: '#787fbd',
    500: '#334ea1',
    950: '#000000',
  },
}
SCSS
$custom: #334ea1;
$custom-light: #787fbd;
$custom-dark: #000000;
JSON
{
  "hex": "#334ea1",
  "rgb": {
    "r": 51,
    "g": 78,
    "b": 161
  },
  "hsl": {
    "h": 225.273,
    "s": 51.887,
    "l": 41.569
  },
  "oklch": {
    "l": 0.45016,
    "c": 0.1382,
    "h": 267.1
  },
  "luminance": 0.08726
}

Semantic roles & 50–950 ramp

primary
#334EA1
secondary
#BDAB72
accent
#B84CDB
background
#F7F7FB
surface
#EEEEF7
border
#C9C9D0
text
#0A0A12
muted
#7C7C81

Preview Lab

Preview with #334EA1

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

Preview Lab → · Contrast checker → · Palette generator →

#334EA1 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva