Skip to content

#1d0c2d

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

RGB
29, 12, 45
HSL
271°, 58%, 11%
CMYK
36, 73, 0, 82
Luminance
0.0071

At a glance

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

Hex
#1d0c2d
Hue
271°
violet
Saturation
58%
vivid
Lightness
11%
deep
Brightness
18%
HSV value
Perceived
9%
weighted brightness
Luminance
0.0071
WCAG relative
Temperature
Cool
66/100 cool
Color family
Violet
Tone
Vivid
Best ink
White
18.38:1
Closest name
Midnight Blue
ΔE2000 14.6
Where it sits
Hue271° of 360°
Saturation58%
Lightness11%
Temperature
Warm ← → Cool66% 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#1d0c2d
RGBrgb(29, 12, 45)
HSLhsl(271, 58%, 11%)
CMYKcmyk(36%, 73%, 0%, 82%)
LABlab(6.5 16.8 -18.6)
LCHlch(6.5 25.0 312.0)
OKLCHoklch(0.200 0.065 305.0)
Decimal1903661
Display P3color(display-p3 0.114 0.047 0.176)

Copy-ready code

/* CSS */
color: #1d0c2d;
background-color: #1d0c2d;
/* Tailwind (arbitrary) */
class="text-[#1d0c2d] bg-[#1d0c2d]"
/* SCSS */
$brand: #1d0c2d;
/* SwiftUI */
Color(red: 0.114, green: 0.047, blue: 0.176)
/* Android */
Color.parseColor("#1d0c2d")
/* Flutter */
Color(0xFF1D0C2D)
/* Python / OpenCV (BGR) */
(45, 12, 29)

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

Accessibility — WCAG contrast

Aa
#1d0c2d on white: 18.38:1
AA ✓ pass · AA-large · AAA
Aa
#1d0c2d on black: 1.14:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #01142E
deuteranopia · #06142C
tritanopia · #1A131A

Color scale — 50 to 950

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

#F7F4FB
#F0E9F7
#DECDEF
#C8A6E7
#AC7ADC
#914ED0
#7D34C1
#682BA1
#532281
#3E1D5E
#1d0c2d
Base = 950Lightest = 50 · #F7F4FBDarkest = 950 · #1d0c2d
:root {
  --brand-50: #F7F4FB;
  --brand-100: #F0E9F7;
  --brand-200: #DECDEF;
  --brand-300: #C8A6E7;
  --brand-400: #AC7ADC;
  --brand-500: #914ED0;
  --brand-600: #7D34C1;
  --brand-700: #682BA1;
  --brand-800: #532281;
  --brand-900: #3E1D5E;
  --brand-950: #1d0c2d;
  --brand: #1d0c2d;
  --brand-ink: #ffffff;
}

Colors that work with #1d0c2d

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#F7F4FA
Tinted page background
Border#D7C0ED
Hairlines and dividers
Muted text#744B9B
Captions on the surface
Accent#252E0B
Second voice, not a rival
Dark variant#411B65
Hover, pressed, headers
Light variant#F2EBFA
Selected rows, tints
Dark surface#1C1424
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 #1d0c2d

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#1C2D0C
Analogous left#0D0C2D
Analogous right#2D0C2D
Split-complement 1#2D2D0C
Split-complement 2#0C2D0D
Triadic 1#2D1D0C
Triadic 2#0C2D1D
Tetradic#2D0D0C

RGB percentages

Red11.4%
Green4.7%
Blue17.6%

CMYK percentages

Cyan35.6%
Magenta73.3%
Yellow0.0%
Key (black)82.4%

Color previews

#1d0c2d text on a black background

contrast 1.14:1

Card sample

#1d0c2d text on a white background

contrast 18.38:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #1d0c2d;
Background color
Panel with #1d0c2d background
background-color: #1d0c2d;
Text shadow — hex

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(29, 12, 45, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(29, 12, 45, 0.45);
Border & gradient
Gradient panel
border: 3px solid #1d0c2d;
background: linear-gradient(135deg, #1d0c2d, #2D0C27);

Monochromatic scale

Palettes built from #1d0c2d

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.

#1d0c2d 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.

#1d0c2d, answered

What color is #1d0c2d?

#1d0c2d is a deep vivid violet, closest to Midnight Blue (ΔE2000 14.6). It sits at 271° on the hue wheel with 58% saturation and 11% lightness, which reads as cool.

What is the RGB value of #1d0c2d?

rgb(29, 12, 45) — 29 red, 12 green and 45 blue out of 255, or 11.4% / 4.7% / 17.6% by channel.

Is #1d0c2d a light or a dark color?

It is a dark color. Relative luminance is 0.0071 and perceived brightness is 9%, so white text on it reaches 18.38:1.

Should I use black or white text on #1d0c2d?

White. It scores 18.38:1 against #1d0c2d, versus 1.14:1 for black — AAA at any size.

What is the complementary color of #1d0c2d?

#1C2D0C sits directly opposite on the wheel. Softer options are the split-complements #2D2D0C and #0C2D0D, which give the same contrast with far less vibration.

What colors go well with #1d0c2d?

For interface work: #F7F4FA as the surface, #D7C0ED for borders, #744B9B for secondary text, #252E0B as an accent and #411B65 for hover and pressed states. For a palette, the analogous pair #0D0C2D and #2D0C2D stays calm, while #1C2D0C is the loudest partner.

What is #1d0c2d in CMYK for printing?

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

Is #1d0c2d warm or cool?

Cool — it scores 66 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #290C2D; nudged cooler, #110B2E.

Work with #1d0c2d in the Color Lab