#3340A8#3340A8

#3340A8 is a dark, vivid blue. Relative luminance 0.072; OKLCH L 42.8% C 0.166 H 271.9°. Best body text is #FFFFFF at 8.61:1 contrast (WCAG AA passes).

Color values

HEX#3340A8
RGBrgb(51, 64, 168)
HSLhsl(233, 53%, 43%)
HSVhsv(233, 70%, 66%)
CMYKcmyk(69.6%, 61.9%, 0%, 34.1%)
CIE-LABlab(32.25, 30.13, -57.48)
CIE-LCHlch(32.25, 64.90, 297.66°)
OKLaboklab(42.79% 0.0055 -0.1658)
OKLCHoklch(42.79% 0.166 271.9)
XYZxyz(10.2641, 7.1968, 37.8864)
Luminance0.0720 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#3340A8 #A89B33
analogous
#337BA8 #3340A8 #6033A8
triadic
#3340A8 #A83340 #40A833
tetradic
#3340A8 #A8337B #A89B33 #33A860
square
#3340A8 #A8337B #A89B33 #33A860
split-complementary
#3340A8 #A86033 #7BA833
monochromatic
#161C4A #252E79 #3340A8 #4F5CC9 #7E88D8

Accessibility & contrast

On white

8.61
#3340A8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.44
#3340A8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #3340A8
8.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##3340A8#FFFFFF#000000##FFFFFF
##3340A81.008.612.448.61
#FFFFFF8.611.0021.001.00
#0000002.4421.001.0021.00
##FFFFFF8.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0051AB
Deuteranopia (green-blind)
#0047A6
Tritanopia (blue-blind)
#005A6E
Achromatopsia (no color)
#4C4C4C

Design tokens & code

CSS
--color: #3340a8;
/* rgb */ color: rgb(51, 64, 168);
/* oklch */ color: oklch(42.8% 0.166 271.9);
Tailwind
colors: {
  custom: {
    50: '#7a74c3',
    500: '#3340a8',
    950: '#000000',
  },
}
SCSS
$custom: #3340a8;
$custom-light: #7a74c3;
$custom-dark: #000000;
JSON
{
  "hex": "#3340a8",
  "rgb": {
    "r": 51,
    "g": 64,
    "b": 168
  },
  "hsl": {
    "h": 233.333,
    "s": 53.425,
    "l": 42.941
  },
  "oklch": {
    "l": 0.42789,
    "c": 0.16591,
    "h": 271.9
  },
  "luminance": 0.07198
}

Semantic roles & 50–950 ramp

primary
#3340A8
secondary
#C1B876
accent
#CD4BDD
background
#F8F7FC
surface
#EFEDF8
border
#CAC8D1
text
#0A0813
muted
#7C7B82

Preview Lab

Preview with #3340A8

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

Preview Lab → · Contrast checker → · Palette generator →

#3340A8 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva