#271F74#271F74

#271F74 is a dark, vivid blue. Relative luminance 0.027; OKLCH L 31.2% C 0.139 H 278.9°. Best body text is #FFFFFF at 13.69:1 contrast (WCAG AA passes).

Color values

HEX#271F74
RGBrgb(39, 31, 116)
HSLhsl(246, 58%, 29%)
HSVhsv(246, 73%, 45%)
CMYKcmyk(66.4%, 73.3%, 0%, 54.5%)
CIE-LABlab(18.68, 31.11, -47.48)
CIE-LCHlch(18.68, 56.76, 303.23°)
OKLaboklab(31.23% 0.0215 -0.137)
OKLCHoklch(31.23% 0.139 278.9)
XYZxyz(4.4781, 2.6719, 16.7994)
Luminance0.0267 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#271F74 #6C741F
analogous
#1F4274 #271F74 #521F74
triadic
#271F74 #74271F #1F7427
tetradic
#271F74 #741F42 #6C741F #1F7452
square
#271F74 #741F42 #6C741F #1F7452
split-complementary
#271F74 #74521F #42741F
monochromatic
#080618 #171244 #271F74 #372CA4 #4E41CC

Accessibility & contrast

On white

13.69
#271F74 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#271F74 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #271F74
13.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##271F74#FFFFFF#000000##FFFFFF
##271F741.0013.691.5313.69
#FFFFFF13.691.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003177
Deuteranopia (green-blind)
#002A72
Tritanopia (blue-blind)
#003647
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #271f74;
/* rgb */ color: rgb(39, 31, 116);
/* oklch */ color: oklch(31.2% 0.139 278.9);
Tailwind
colors: {
  custom: {
    50: '#6c5c9d',
    500: '#271f74',
    950: '#000000',
  },
}
SCSS
$custom: #271f74;
$custom-light: #6c5c9d;
$custom-dark: #000000;
JSON
{
  "hex": "#271f74",
  "rgb": {
    "r": 39,
    "g": 31,
    "b": 116
  },
  "hsl": {
    "h": 245.647,
    "s": 57.823,
    "l": 28.824
  },
  "oklch": {
    "l": 0.31226,
    "c": 0.13865,
    "h": 278.9
  },
  "luminance": 0.02672
}

Semantic roles & 50–950 ramp

primary
#271F74
secondary
#9FA847
accent
#E147D3
background
#F6F5F9
surface
#ECE9F2
border
#C7C5CC
text
#08040E
muted
#7A797E

Preview Lab

Preview with #271F74

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

Preview Lab → · Contrast checker → · Palette generator →

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