#2831B2#2831B2

#2831B2 is a dark, vivid blue. Relative luminance 0.059; OKLCH L 40.6% C 0.199 H 270.6°. Best body text is #FFFFFF at 9.67:1 contrast (WCAG AA passes).

Color values

HEX#2831B2
RGBrgb(40, 49, 178)
HSLhsl(236, 63%, 43%)
HSVhsv(236, 78%, 70%)
CMYKcmyk(77.5%, 72.5%, 0%, 30.2%)
CIE-LABlab(29.06, 41.87, -68.72)
CIE-LCHlch(29.06, 80.47, 301.36°)
OKLaboklab(40.59% 0.0021 -0.199)
OKLCHoklch(40.59% 0.199 270.6)
XYZxyz(10.0065, 5.8610, 42.7148)
Luminance0.0586 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2831B2 #B2A928
analogous
#2876B2 #2831B2 #6428B2
triadic
#2831B2 #B22831 #31B228
tetradic
#2831B2 #B22876 #B2A928 #28B264
square
#2831B2 #B22876 #B2A928 #28B264
split-complementary
#2831B2 #B26428 #76B228
monochromatic
#12154E #1D2380 #2831B2 #434CD5 #757CE0

Accessibility & contrast

On white

9.67
#2831B2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.17
#2831B2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2831B2
9.67:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2831B2#FFFFFF#000000##FFFFFF
##2831B21.009.672.179.67
#FFFFFF9.671.0021.001.00
#0000002.1721.001.0021.00
##FFFFFF9.671.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004BB6
Deuteranopia (green-blind)
#003EB0
Tritanopia (blue-blind)
#00566E
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #2831b2;
/* rgb */ color: rgb(40, 49, 178);
/* oklch */ color: oklch(40.6% 0.199 270.6);
Tailwind
colors: {
  custom: {
    50: '#7a6aca',
    500: '#2831b2',
    950: '#000000',
  },
}
SCSS
$custom: #2831b2;
$custom-light: #7a6aca;
$custom-dark: #000000;
JSON
{
  "hex": "#2831b2",
  "rgb": {
    "r": 40,
    "g": 49,
    "b": 178
  },
  "hsl": {
    "h": 236.087,
    "s": 63.303,
    "l": 42.745
  },
  "oklch": {
    "l": 0.40586,
    "c": 0.199,
    "h": 270.6
  },
  "luminance": 0.05862
}

Semantic roles & 50–950 ramp

primary
#2831B2
secondary
#C7C16F
accent
#DC41E6
background
#F8F6FC
surface
#EFEBF9
border
#CAC6D2
text
#0B0613
muted
#7C7A82

Preview Lab

Preview with #2831B2

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

Preview Lab → · Contrast checker → · Palette generator →

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