Skip to content

#3f1f49

a deep, soft violet · neutral · closest name: Midnight Blue

RGB
63, 31, 73
HSL
286°, 40%, 20%
CMYK
14, 58, 0, 71
Luminance
0.0252

At a glance

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

Hex
#3f1f49
Hue
286°
violet
Saturation
40%
soft
Lightness
20%
deep
Brightness
29%
HSV value
Perceived
19%
weighted brightness
Luminance
0.0252
WCAG relative
Temperature
Neutral
58/100 cool
Color family
Violet
Tone
Soft
Best ink
White
13.97:1
Closest name
Midnight Blue
ΔE2000 13.4
Where it sits
Hue286° of 360°
Saturation40%
Lightness20%
Temperature
Warm ← → Cool58% cool

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

Every format

HEX#3f1f49
RGBrgb(63, 31, 73)
HSLhsl(286, 40%, 20%)
CMYKcmyk(14%, 58%, 0%, 71%)
LABlab(18.0 23.6 -19.9)
LCHlch(18.0 30.8 319.8)
OKLCHoklch(0.303 0.082 317.6)
Decimal4136777
Display P3color(display-p3 0.247 0.122 0.286)

Copy-ready code

/* CSS */
color: #3f1f49;
background-color: #3f1f49;
/* Tailwind (arbitrary) */
class="text-[#3f1f49] bg-[#3f1f49]"
/* SCSS */
$brand: #3f1f49;
/* SwiftUI */
Color(red: 0.247, green: 0.122, blue: 0.286)
/* Android */
Color.parseColor("#3f1f49")
/* Flutter */
Color(0xFF3F1F49)
/* Python / OpenCV (BGR) */
(73, 31, 63)

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 #3f1f49 · 13.97:1
Use #ffffffAAA at every size.
Aa
White text · 13.97:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 1.50:1
AA fail · AA large fail · AAA fail
Reading the other direction: #3f1f49 as text scores 13.97:1 on white and 1.50:1 on black.

Accessibility — WCAG contrast

Aa
#3f1f49 on white: 13.97:1
AA ✓ pass · AA-large · AAA
Aa
#3f1f49 on black: 1.50:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #172A4A
deuteranopia · #212D48
tritanopia · #3F2530

Color scale — 50 to 950

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

#F9F5FA
#F2EBF5
#E4D2EA
#D3B0DE
#BD89CD
#A761BC
#9449AC
#7C3D8F
#633173
#3f1f49
#2E1834
Base = 900Lightest = 50 · #F9F5FADarkest = 950 · #2E1834
:root {
  --brand-50: #F9F5FA;
  --brand-100: #F2EBF5;
  --brand-200: #E4D2EA;
  --brand-300: #D3B0DE;
  --brand-400: #BD89CD;
  --brand-500: #A761BC;
  --brand-600: #9449AC;
  --brand-700: #7C3D8F;
  --brand-800: #633173;
  --brand-900: #3f1f49;
  --brand-950: #2E1834;
  --brand: #3f1f49;
  --brand-ink: #ffffff;
}

Colors that work with #3f1f49

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#DFC6E7
Hairlines and dividers
Muted text#884B9B
Captions on the surface
Accent#334B1D
Second voice, not a rival
Dark variant#4D265A
Hover, pressed, headers
Light variant#F5EDF7
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 #3f1f49

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

Works well for
  • Body text and links on white
  • Charts, tags and secondary surfaces
  • Headers, footers and dark-mode surfaces
  • Brand accents, badges and data highlights
Use with care
  • Text on black or near-black surfaces
  • 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#29491F
Analogous left#2A1F49
Analogous right#491F3E
Split-complement 1#3E491F
Split-complement 2#1F492A
Triadic 1#493F1F
Triadic 2#1F493F
Tetradic#492A1F

RGB percentages

Red24.7%
Green12.2%
Blue28.6%

CMYK percentages

Cyan13.7%
Magenta57.5%
Yellow0.0%
Key (black)71.4%

Color previews

#3f1f49 text on a black background

contrast 1.50:1

Card sample

#3f1f49 text on a white background

contrast 13.97:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #3f1f49;
Background color
Panel with #3f1f49 background
background-color: #3f1f49;
Text shadow — hex

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(63, 31, 73, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(63, 31, 73, 0.45);
Border & gradient
Gradient panel
border: 3px solid #3f1f49;
background: linear-gradient(135deg, #3f1f49, #491F37);

Monochromatic scale

Palettes built from #3f1f49

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.

#3f1f49 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.

#3f1f49, answered

What color is #3f1f49?

#3f1f49 is a deep soft violet, closest to Midnight Blue (ΔE2000 13.4). It sits at 286° on the hue wheel with 40% saturation and 20% lightness, which reads as neutral.

What is the RGB value of #3f1f49?

rgb(63, 31, 73) — 63 red, 31 green and 73 blue out of 255, or 24.7% / 12.2% / 28.6% by channel.

Is #3f1f49 a light or a dark color?

It is a dark color. Relative luminance is 0.0252 and perceived brightness is 19%, so white text on it reaches 13.97:1.

Should I use black or white text on #3f1f49?

White. It scores 13.97:1 against #3f1f49, versus 1.50:1 for black — AAA at any size.

What is the complementary color of #3f1f49?

#29491F sits directly opposite on the wheel. Softer options are the split-complements #3E491F and #1F492A, which give the same contrast with far less vibration.

What colors go well with #3f1f49?

For interface work: #F9F4FA as the surface, #DFC6E7 for borders, #884B9B for secondary text, #334B1D as an accent and #4D265A for hover and pressed states. For a palette, the analogous pair #2A1F49 and #491F3E stays calm, while #29491F is the loudest partner.

What is #3f1f49 in CMYK for printing?

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

Is #3f1f49 warm or cool?

Neutral — it scores 58 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #491F44; nudged cooler, #2F1E4A.

Work with #3f1f49 in the Color Lab