#271F78#271F78

#271F78 is a dark, vivid blue. Relative luminance 0.028; OKLCH L 31.6% C 0.144 H 278.3°. Best body text is #FFFFFF at 13.52:1 contrast (WCAG AA passes).

Color values

HEX#271F78
RGBrgb(39, 31, 120)
HSLhsl(245, 59%, 30%)
HSVhsv(245, 74%, 47%)
CMYKcmyk(67.5%, 74.2%, 0%, 52.9%)
CIE-LABlab(19.09, 32.50, -49.38)
CIE-LCHlch(19.09, 59.11, 303.35°)
OKLaboklab(31.64% 0.0207 -0.1425)
OKLCHoklch(31.64% 0.144 278.3)
XYZxyz(4.7158, 2.7670, 18.0512)
Luminance0.0277 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#271F78 #70781F
analogous
#1F4478 #271F78 #541F78
triadic
#271F78 #78271F #1F7827
tetradic
#271F78 #781F44 #70781F #1F7854
square
#271F78 #781F44 #70781F #1F7854
split-complementary
#271F78 #78541F #44781F
monochromatic
#080618 #171247 #271F78 #372CA9 #5043CE

Accessibility & contrast

On white

13.52
#271F78 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.55
#271F78 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #271F78
13.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##271F78#FFFFFF#000000##FFFFFF
##271F781.0013.521.5513.52
#FFFFFF13.521.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00327B
Deuteranopia (green-blind)
#002B76
Tritanopia (blue-blind)
#003849
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #271f78;
/* rgb */ color: rgb(39, 31, 120);
/* oklch */ color: oklch(31.6% 0.144 278.3);
Tailwind
colors: {
  custom: {
    50: '#6d5ca0',
    500: '#271f78',
    950: '#000000',
  },
}
SCSS
$custom: #271f78;
$custom-light: #6d5ca0;
$custom-dark: #000000;
JSON
{
  "hex": "#271f78",
  "rgb": {
    "r": 39,
    "g": 31,
    "b": 120
  },
  "hsl": {
    "h": 245.393,
    "s": 58.94,
    "l": 29.608
  },
  "oklch": {
    "l": 0.3164,
    "c": 0.14403,
    "h": 278.3
  },
  "luminance": 0.02767
}

Semantic roles & 50–950 ramp

primary
#271F78
secondary
#A2AB47
accent
#E246D4
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040F
muted
#7B797E

Preview Lab

Preview with #271F78

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

Preview Lab → · Contrast checker → · Palette generator →

#271F78 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva