#2F31A3#2F31A3

#2F31A3 is a dark, vivid blue. Relative luminance 0.054; OKLCH L 39.5% C 0.178 H 273.9°. Best body text is #FFFFFF at 10.05:1 contrast (WCAG AA passes).

Color values

HEX#2F31A3
RGBrgb(47, 49, 163)
HSLhsl(239, 55%, 41%)
HSVhsv(239, 71%, 64%)
CMYKcmyk(71.2%, 69.9%, 0%, 36.1%)
CIE-LABlab(27.97, 37.37, -61.50)
CIE-LCHlch(27.97, 71.96, 301.28°)
OKLaboklab(39.46% 0.012 -0.1778)
OKLCHoklch(39.46% 0.178 273.9)
XYZxyz(8.8793, 5.4445, 35.2262)
Luminance0.0544 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F31A3 #A3A12F
analogous
#2F6BA3 #2F31A3 #672FA3
triadic
#2F31A3 #A32F31 #31A32F
tetradic
#2F31A3 #A32F6B #A3A12F #2FA367
square
#2F31A3 #A32F6B #A3A12F #2FA367
split-complementary
#2F31A3 #A3672F #6BA32F
monochromatic
#141444 #212373 #2F31A3 #4648CA #7577D7

Accessibility & contrast

On white

10.05
#2F31A3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.09
#2F31A3 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F31A3
10.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F31A3#FFFFFF#000000##FFFFFF
##2F31A31.0010.052.0910.05
#FFFFFF10.051.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047A6
Deuteranopia (green-blind)
#003DA1
Tritanopia (blue-blind)
#005066
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #2f31a3;
/* rgb */ color: rgb(47, 49, 163);
/* oklch */ color: oklch(39.5% 0.178 273.9);
Tailwind
colors: {
  custom: {
    50: '#796abf',
    500: '#2f31a3',
    950: '#000000',
  },
}
SCSS
$custom: #2f31a3;
$custom-light: #796abf;
$custom-dark: #000000;
JSON
{
  "hex": "#2f31a3",
  "rgb": {
    "r": 47,
    "g": 49,
    "b": 163
  },
  "hsl": {
    "h": 238.966,
    "s": 55.238,
    "l": 41.176
  },
  "oklch": {
    "l": 0.39458,
    "c": 0.17816,
    "h": 273.9
  },
  "luminance": 0.05445
}

Semantic roles & 50–950 ramp

primary
#2F31A3
secondary
#BFBE6F
accent
#DC49DF
background
#F7F6FB
surface
#EEEBF7
border
#C9C6D0
text
#0A0612
muted
#7C7A81

Preview Lab

Preview with #2F31A3

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

Preview Lab → · Contrast checker → · Palette generator →

#2F31A3 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva