#2F177F#2F177F

#2F177F is a dark, vivid violet. Relative luminance 0.027; OKLCH L 32.0% C 0.160 H 283.2°. Best body text is #FFFFFF at 13.55:1 contrast (WCAG AA passes).

Color values

HEX#2F177F
RGBrgb(47, 23, 127)
HSLhsl(254, 69%, 29%)
HSVhsv(254, 82%, 50%)
CMYKcmyk(63%, 81.9%, 0%, 50.2%)
CIE-LABlab(19.01, 40.22, -53.94)
CIE-LCHlch(19.01, 67.28, 306.71°)
OKLaboklab(31.99% 0.0366 -0.1555)
OKLCHoklch(31.99% 0.16 283.2)
XYZxyz(5.3083, 2.7491, 20.3255)
Luminance0.0275 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F177F #677F17
analogous
#17337F #2F177F #63177F
triadic
#2F177F #7F2F17 #177F2F
tetradic
#2F177F #7F1733 #677F17 #177F63
square
#2F177F #7F1733 #677F17 #177F63
split-complementary
#2F177F #7F6317 #337F17
monochromatic
#0A051A #1C0E4B #2F177F #4220B3 #5C36DB

Accessibility & contrast

On white

13.55
#2F177F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.55
#2F177F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F177F
13.55:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F177F#FFFFFF#000000##FFFFFF
##2F177F1.0013.551.5513.55
#FFFFFF13.551.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.551.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003182
Deuteranopia (green-blind)
#002B7D
Tritanopia (blue-blind)
#00364B
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #2f177f;
/* rgb */ color: rgb(47, 23, 127);
/* oklch */ color: oklch(32.0% 0.160 283.2);
Tailwind
colors: {
  custom: {
    50: '#7358a5',
    500: '#2f177f',
    950: '#000000',
  },
}
SCSS
$custom: #2f177f;
$custom-light: #7358a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2f177f",
  "rgb": {
    "r": 47,
    "g": 23,
    "b": 127
  },
  "hsl": {
    "h": 253.846,
    "s": 69.333,
    "l": 29.412
  },
  "oklch": {
    "l": 0.31994,
    "c": 0.15978,
    "h": 283.2
  },
  "luminance": 0.02749
}

Semantic roles & 50–950 ramp

primary
#2F177F
secondary
#98B43E
accent
#EC3CC3
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2F177F

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

Preview Lab → · Contrast checker → · Palette generator →

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