#334787#334787

#334787 is a dark, moderate blue. Relative luminance 0.070; OKLCH L 41.6% C 0.109 H 268.3°. Best body text is #FFFFFF at 8.78:1 contrast (WCAG AA passes).

Color values

HEX#334787
RGBrgb(51, 71, 135)
HSLhsl(226, 45%, 36%)
HSVhsv(226, 62%, 53%)
CMYKcmyk(62.2%, 47.4%, 0%, 47.1%)
CIE-LABlab(31.71, 13.37, -38.28)
CIE-LCHlch(31.71, 40.55, 289.26°)
OKLaboklab(41.61% -0.0032 -0.1093)
OKLCHoklch(41.61% 0.109 268.3)
XYZxyz(7.9902, 6.9589, 23.8391)
Luminance0.0696 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#334787 #877333
analogous
#337187 #334787 #493387
triadic
#334787 #873347 #478733
tetradic
#334787 #873371 #877333 #338749
square
#334787 #873371 #877333 #338749
split-complementary
#334787 #874933 #718733
monochromatic
#11182E #22305B #334787 #445EB3 #6D82C8

Accessibility & contrast

On white

8.78
#334787 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.39
#334787 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #334787
8.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##334787#FFFFFF#000000##FFFFFF
##3347871.008.782.398.78
#FFFFFF8.781.0021.001.00
#0000002.3921.001.0021.00
##FFFFFF8.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#294F89
Deuteranopia (green-blind)
#1B4786
Tritanopia (blue-blind)
#005560
Achromatopsia (no color)
#4B4B4B

Design tokens & code

CSS
--color: #334787;
/* rgb */ color: rgb(51, 71, 135);
/* oklch */ color: oklch(41.6% 0.109 268.3);
Tailwind
colors: {
  custom: {
    50: '#7379aa',
    500: '#334787',
    950: '#000000',
  },
}
SCSS
$custom: #334787;
$custom-light: #7379aa;
$custom-dark: #000000;
JSON
{
  "hex": "#334787",
  "rgb": {
    "r": 51,
    "g": 71,
    "b": 135
  },
  "hsl": {
    "h": 225.714,
    "s": 45.161,
    "l": 36.471
  },
  "oklch": {
    "l": 0.41613,
    "c": 0.10932,
    "h": 268.3
  },
  "luminance": 0.0696
}

Semantic roles & 50–950 ramp

primary
#334787
secondary
#B09E66
accent
#B653D5
background
#F7F7FA
surface
#EDEDF4
border
#C8C8CE
text
#090910
muted
#7B7B7F

Preview Lab

Preview with #334787

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

Preview Lab → · Contrast checker → · Palette generator →

#334787 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva