Skip to content

#2f1439

a deep, vivid violet · cool · closest name: Midnight Blue

RGB
47, 20, 57
HSL
284°, 48%, 15%
CMYK
18, 65, 0, 78
Luminance
0.0140

At a glance

Every number on this page in one read: what #2f1439 is made of, how bright it looks, and which way it leans.

Hex
#2f1439
Hue
284°
violet
Saturation
48%
vivid
Lightness
15%
deep
Brightness
22%
HSV value
Perceived
14%
weighted brightness
Luminance
0.0140
WCAG relative
Temperature
Cool
59/100 cool
Color family
Violet
Tone
Vivid
Best ink
White
16.41:1
Closest name
Midnight Blue
ΔE2000 14.1
Where it sits
Hue284° of 360°
Saturation48%
Lightness15%
Temperature
Warm ← → Cool59% cool

Reads cool. Warm and cool siblings keep the same lightness, so you can swap one in without redoing your contrast maths.

Every format

HEX#2f1439
RGBrgb(47, 20, 57)
HSLhsl(284, 48%, 15%)
CMYKcmyk(18%, 65%, 0%, 78%)
LABlab(12.0 21.1 -18.4)
LCHlch(12.0 28.0 318.9)
OKLCHoklch(0.250 0.074 316.0)
Decimal3085369
Display P3color(display-p3 0.184 0.078 0.224)

Copy-ready code

/* CSS */
color: #2f1439;
background-color: #2f1439;
/* Tailwind (arbitrary) */
class="text-[#2f1439] bg-[#2f1439]"
/* SCSS */
$brand: #2f1439;
/* SwiftUI */
Color(red: 0.184, green: 0.078, blue: 0.224)
/* Android */
Color.parseColor("#2f1439")
/* Flutter */
Color(0xFF2F1439)
/* Python / OpenCV (BGR) */
(57, 20, 47)

Best text color

Only one of black and white can be right. This is the one, with the number that proves it.

Readable at a glance#ffffff on #2f1439 · 16.41:1
Use #ffffffAAA at every size.
Aa
White text · 16.41:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 1.28:1
AA fail · AA large fail · AAA fail
Reading the other direction: #2f1439 as text scores 16.41:1 on white and 1.28:1 on black.

Accessibility — WCAG contrast

Aa
#2f1439 on white: 16.41:1
AA ✓ pass · AA-large · AAA
Aa
#2f1439 on black: 1.28:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0B1E3A
deuteranopia · #142038
tritanopia · #2E1A24

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #2f1439 is pinned to step 950; the rest hold its hue and let saturation ease off at the extremes so the pale end never turns neon.

#F9F4FA
#F2EAF5
#E4D0EC
#D3ACE2
#BD82D3
#A859C5
#9540B5
#7D3597
#642A79
#4A2258
#2f1439
Base = 950Lightest = 50 · #F9F4FADarkest = 950 · #2f1439
:root {
  --brand-50: #F9F4FA;
  --brand-100: #F2EAF5;
  --brand-200: #E4D0EC;
  --brand-300: #D3ACE2;
  --brand-400: #BD82D3;
  --brand-500: #A859C5;
  --brand-600: #9540B5;
  --brand-700: #7D3597;
  --brand-800: #642A79;
  --brand-900: #4A2258;
  --brand-950: #2f1439;
  --brand: #2f1439;
  --brand-ink: #ffffff;
}

Colors that work with #2f1439

Not a palette — a role sheet. Each swatch answers one question you will hit while building the component.

Text on it#ffffff
White wins here
Surface#F9F4FA
Tinted page background
Border#DFC3EA
Hairlines and dividers
Muted text#854B9B
Captions on the surface
Accent#273B12
Second voice, not a rival
Dark variant#4E215E
Hover, pressed, headers
Light variant#F5ECF8
Selected rows, tints
Dark surface#201424
Dark-mode background
Light mode
Everything in its place

Surface, border, heading and body all derive from this one hue, so the screen stays coherent without a second palette.

Primary actionSecondaryBadge
Dark mode
Same hue, inverted

Lightness flips, hue holds. The accent stays the anchor in both themes.

Primary actionSecondaryAccent

How to use #2f1439

Derived from its contrast, chroma and lightness — not from taste.

Works well for
  • Body text and links on white
  • Primary buttons and calls to action
  • Focus rings, active and selected states
  • Headers, footers and dark-mode surfaces
  • Brand accents, badges and data highlights
Use with care
  • Text on black or near-black surfaces
  • Full-page backgrounds — tiring over long sessions
  • Black text placed on it
  • Pairing with a same-lightness hue — edges vibrate

Similar colors

One move away from this hex in each direction. Every swatch is its own page.

Color relationships

The wheel positions with their names attached, so you can grab the one you actually need.

Complementary#1E3914
Analogous left#1D1439
Analogous right#391431
Split-complement 1#313914
Split-complement 2#14391D
Triadic 1#392F14
Triadic 2#14392F
Tetradic#391D14

RGB percentages

Red18.4%
Green7.8%
Blue22.4%

CMYK percentages

Cyan17.5%
Magenta64.9%
Yellow0.0%
Key (black)77.6%

Color previews

#2f1439 text on a black background

contrast 1.28:1

Card sample

#2f1439 text on a white background

contrast 16.41:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #2f1439;
Background color
Panel with #2f1439 background
background-color: #2f1439;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #2f1439;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(47, 20, 57, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(47, 20, 57, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2f1439;
background: linear-gradient(135deg, #2f1439, #39142A);

Monochromatic scale

Palettes built from #2f1439

Shades — darker

Tints — lighter

Color harmonies

Nearest named colors

Ranked with CIEDE2000 across all 139 CSS keywords. Under ΔE 2 the eye stops telling them apart; over ΔE 10 they are plainly different colors.

#2f1439 in the real world

Where a color in this family tends to land, and the interface roles it is usually asked to play.

Industries
Creative toolsFintechBeautyLuxury
Common UI roles
ButtonsLinksFocus statesCharts
Print note

Converts to four-color process without much drama. Proof it anyway.

#2f1439, answered

What color is #2f1439?

#2f1439 is a deep vivid violet, closest to Midnight Blue (ΔE2000 14.1). It sits at 284° on the hue wheel with 48% saturation and 15% lightness, which reads as cool.

What is the RGB value of #2f1439?

rgb(47, 20, 57) — 47 red, 20 green and 57 blue out of 255, or 18.4% / 7.8% / 22.4% by channel.

Is #2f1439 a light or a dark color?

It is a dark color. Relative luminance is 0.0140 and perceived brightness is 14%, so white text on it reaches 16.41:1.

Should I use black or white text on #2f1439?

White. It scores 16.41:1 against #2f1439, versus 1.28:1 for black — AAA at any size.

What is the complementary color of #2f1439?

#1E3914 sits directly opposite on the wheel. Softer options are the split-complements #313914 and #14391D, which give the same contrast with far less vibration.

What colors go well with #2f1439?

For interface work: #F9F4FA as the surface, #DFC3EA for borders, #854B9B for secondary text, #273B12 as an accent and #4E215E for hover and pressed states. For a palette, the analogous pair #1D1439 and #391431 stays calm, while #1E3914 is the loudest partner.

What is #2f1439 in CMYK for printing?

cmyk(18%, 65%, 0%, 78%). This is a screen-to-ink approximation — ask your printer for a proof before committing to a run.

Is #2f1439 warm or cool?

Cool — it scores 59 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #391435; nudged cooler, #21133A.

Work with #2f1439 in the Color Lab