#2F21A4#2F21A4

#2F21A4 is a dark, vivid blue. Relative luminance 0.044; OKLCH L 37.3% C 0.195 H 276.0°. Best body text is #FFFFFF at 11.20:1 contrast (WCAG AA passes).

Color values

HEX#2F21A4
RGBrgb(47, 33, 164)
HSLhsl(246, 66%, 39%)
HSVhsv(246, 80%, 64%)
CMYKcmyk(71.3%, 79.9%, 0%, 35.7%)
CIE-LABlab(24.86, 46.71, -67.22)
CIE-LCHlch(24.86, 81.85, 304.80°)
OKLaboklab(37.29% 0.0204 -0.1943)
OKLCHoklch(37.29% 0.195 276)
XYZxyz(8.4148, 4.3716, 35.5151)
Luminance0.0437 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F21A4 #96A421
analogous
#2154A4 #2F21A4 #7021A4
triadic
#2F21A4 #A42F21 #21A42F
tetradic
#2F21A4 #A42154 #96A421 #21A470
square
#2F21A4 #A42154 #96A421 #21A470
split-complementary
#2F21A4 #A47021 #54A421
monochromatic
#120C3E #201771 #2F21A4 #3F2DD5 #6E60DF

Accessibility & contrast

On white

11.20
#2F21A4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.87
#2F21A4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F21A4
11.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F21A4#FFFFFF#000000##FFFFFF
##2F21A41.0011.201.8711.20
#FFFFFF11.201.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0040A8
Deuteranopia (green-blind)
#0035A2
Tritanopia (blue-blind)
#004963
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #2f21a4;
/* rgb */ color: rgb(47, 33, 164);
/* oklch */ color: oklch(37.3% 0.195 276.0);
Tailwind
colors: {
  custom: {
    50: '#7a60c0',
    500: '#2f21a4',
    950: '#000000',
  },
}
SCSS
$custom: #2f21a4;
$custom-light: #7a60c0;
$custom-dark: #000000;
JSON
{
  "hex": "#2f21a4",
  "rgb": {
    "r": 47,
    "g": 33,
    "b": 164
  },
  "hsl": {
    "h": 246.412,
    "s": 66.497,
    "l": 38.627
  },
  "oklch": {
    "l": 0.37289,
    "c": 0.19539,
    "h": 276
  },
  "luminance": 0.04372
}

Semantic roles & 50–950 ramp

primary
#2F21A4
secondary
#B9C45D
accent
#E93ED7
background
#F8F5FC
surface
#EFEAF8
border
#CAC6D1
text
#0B0512
muted
#7C7981

Preview Lab

Preview with #2F21A4

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

Preview Lab → · Contrast checker → · Palette generator →

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