#271F7B#271F7B

#271F7B is a dark, vivid blue. Relative luminance 0.028; OKLCH L 32.0% C 0.148 H 277.8°. Best body text is #FFFFFF at 13.39:1 contrast (WCAG AA passes).

Color values

HEX#271F7B
RGBrgb(39, 31, 123)
HSLhsl(245, 60%, 30%)
HSVhsv(245, 75%, 48%)
CMYKcmyk(68.3%, 74.8%, 0%, 51.8%)
CIE-LABlab(19.40, 33.53, -50.78)
CIE-LCHlch(19.40, 60.86, 303.44°)
OKLaboklab(31.96% 0.0201 -0.1466)
OKLCHoklch(31.96% 0.148 277.8)
XYZxyz(4.9007, 2.8410, 19.0252)
Luminance0.0284 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#271F7B #737B1F
analogous
#1F457B #271F7B #551F7B
triadic
#271F7B #7B271F #1F7B27
tetradic
#271F7B #7B1F45 #737B1F #1F7B55
square
#271F7B #7B1F45 #737B1F #1F7B55
split-complementary
#271F7B #7B551F #457B1F
monochromatic
#080619 #18134A #271F7B #362BAC #5144D0

Accessibility & contrast

On white

13.39
#271F7B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.57
#271F7B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #271F7B
13.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##271F7B#FFFFFF#000000##FFFFFF
##271F7B1.0013.391.5713.39
#FFFFFF13.391.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00337E
Deuteranopia (green-blind)
#002B79
Tritanopia (blue-blind)
#00394B
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #271f7b;
/* rgb */ color: rgb(39, 31, 123);
/* oklch */ color: oklch(32.0% 0.148 277.8);
Tailwind
colors: {
  custom: {
    50: '#6e5ca2',
    500: '#271f7b',
    950: '#000000',
  },
}
SCSS
$custom: #271f7b;
$custom-light: #6e5ca2;
$custom-dark: #000000;
JSON
{
  "hex": "#271f7b",
  "rgb": {
    "r": 39,
    "g": 31,
    "b": 123
  },
  "hsl": {
    "h": 245.217,
    "s": 59.74,
    "l": 30.196
  },
  "oklch": {
    "l": 0.31955,
    "c": 0.14802,
    "h": 277.8
  },
  "luminance": 0.02841
}

Semantic roles & 50–950 ramp

primary
#271F7B
secondary
#A5AE48
accent
#E345D5
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#08040F
muted
#7B797F

Preview Lab

Preview with #271F7B

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

Preview Lab → · Contrast checker → · Palette generator →

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