Skip to content

#331c3d

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

RGB
51, 28, 61
HSL
282°, 37%, 18%
CMYK
16, 54, 0, 76
Luminance
0.0187

At a glance

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

Hex
#331c3d
Hue
282°
violet
Saturation
37%
soft
Lightness
18%
deep
Brightness
24%
HSV value
Perceived
16%
weighted brightness
Luminance
0.0187
WCAG relative
Temperature
Cool
60/100 cool
Color family
Violet
Tone
Soft
Best ink
White
15.28:1
Closest name
Midnight Blue
ΔE2000 14.5
Where it sits
Hue282° of 360°
Saturation37%
Lightness18%
Temperature
Warm ← → Cool60% 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#331c3d
RGBrgb(51, 28, 61)
HSLhsl(282, 37%, 18%)
CMYKcmyk(16%, 54%, 0%, 76%)
LABlab(14.8 18.4 -16.7)
LCHlch(14.8 24.8 317.6)
OKLCHoklch(0.273 0.066 314.9)
Decimal3349565
Display P3color(display-p3 0.200 0.110 0.239)

Copy-ready code

/* CSS */
color: #331c3d;
background-color: #331c3d;
/* Tailwind (arbitrary) */
class="text-[#331c3d] bg-[#331c3d]"
/* SCSS */
$brand: #331c3d;
/* SwiftUI */
Color(red: 0.200, green: 0.110, blue: 0.239)
/* Android */
Color.parseColor("#331c3d")
/* Flutter */
Color(0xFF331C3D)
/* Python / OpenCV (BGR) */
(61, 28, 51)

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

Accessibility — WCAG contrast

Aa
#331c3d on white: 15.28:1
AA ✓ pass · AA-large · AAA
Aa
#331c3d on black: 1.37:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #15243E
deuteranopia · #1C263C
tritanopia · #322129

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #331c3d 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.

#F8F5FA
#F1EBF4
#E2D3E9
#CFB2DC
#B78CCA
#9F65B8
#8C4DA8
#75408C
#5E3370
#452852
#331c3d
Base = 950Lightest = 50 · #F8F5FADarkest = 950 · #331c3d
:root {
  --brand-50: #F8F5FA;
  --brand-100: #F1EBF4;
  --brand-200: #E2D3E9;
  --brand-300: #CFB2DC;
  --brand-400: #B78CCA;
  --brand-500: #9F65B8;
  --brand-600: #8C4DA8;
  --brand-700: #75408C;
  --brand-800: #5E3370;
  --brand-900: #452852;
  --brand-950: #331c3d;
  --brand: #331c3d;
  --brand-ink: #ffffff;
}

Colors that work with #331c3d

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#F8F5FA
Tinted page background
Border#DCC7E5
Hairlines and dividers
Muted text#834B9B
Captions on the surface
Accent#2F3F1A
Second voice, not a rival
Dark variant#492857
Hover, pressed, headers
Light variant#F4EEF7
Selected rows, tints
Dark surface#1F1424
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 #331c3d

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#263D1C
Analogous left#231C3D
Analogous right#3D1C37
Split-complement 1#373D1C
Split-complement 2#1C3D23
Triadic 1#3D331C
Triadic 2#1C3D33
Tetradic#3D231C

RGB percentages

Red20.0%
Green11.0%
Blue23.9%

CMYK percentages

Cyan16.4%
Magenta54.1%
Yellow0.0%
Key (black)76.1%

Color previews

#331c3d text on a black background

contrast 1.37:1

Card sample

#331c3d text on a white background

contrast 15.28:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #331c3d;
Background color
Panel with #331c3d background
background-color: #331c3d;
Text shadow — hex

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(51, 28, 61, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(51, 28, 61, 0.45);
Border & gradient
Gradient panel
border: 3px solid #331c3d;
background: linear-gradient(135deg, #331c3d, #3D1C31);

Monochromatic scale

Palettes built from #331c3d

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.

#331c3d 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.

#331c3d, answered

What color is #331c3d?

#331c3d is a deep soft violet, closest to Midnight Blue (ΔE2000 14.5). It sits at 282° on the hue wheel with 37% saturation and 18% lightness, which reads as cool.

What is the RGB value of #331c3d?

rgb(51, 28, 61) — 51 red, 28 green and 61 blue out of 255, or 20% / 11% / 23.9% by channel.

Is #331c3d a light or a dark color?

It is a dark color. Relative luminance is 0.0187 and perceived brightness is 16%, so white text on it reaches 15.28:1.

Should I use black or white text on #331c3d?

White. It scores 15.28:1 against #331c3d, versus 1.37:1 for black — AAA at any size.

What is the complementary color of #331c3d?

#263D1C sits directly opposite on the wheel. Softer options are the split-complements #373D1C and #1C3D23, which give the same contrast with far less vibration.

What colors go well with #331c3d?

For interface work: #F8F5FA as the surface, #DCC7E5 for borders, #834B9B for secondary text, #2F3F1A as an accent and #492857 for hover and pressed states. For a palette, the analogous pair #231C3D and #3D1C37 stays calm, while #263D1C is the loudest partner.

What is #331c3d in CMYK for printing?

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

Is #331c3d warm or cool?

Cool — it scores 60 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #3D1C3B; nudged cooler, #271B3E.

Work with #331c3d in the Color Lab