Skip to content

#2a233f

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

RGB
42, 35, 63
HSL
255°, 29%, 19%
CMYK
33, 44, 0, 75
Luminance
0.0205

At a glance

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

Hex
#2a233f
Hue
255°
violet
Saturation
29%
soft
Lightness
19%
deep
Brightness
25%
HSV value
Perceived
16%
weighted brightness
Luminance
0.0205
WCAG relative
Temperature
Cool
70/100 cool
Color family
Violet
Tone
Soft
Best ink
White
14.89:1
Closest name
Midnight Blue
ΔE2000 14.1
Where it sits
Hue255° of 360°
Saturation29%
Lightness19%
Temperature
Warm ← → Cool70% 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#2a233f
RGBrgb(42, 35, 63)
HSLhsl(255, 29%, 19%)
CMYKcmyk(33%, 44%, 0%, 75%)
LABlab(15.8 10.8 -16.7)
LCHlch(15.8 19.9 303.0)
OKLCHoklch(0.278 0.051 294.3)
Decimal2761535
Display P3color(display-p3 0.165 0.137 0.247)

Copy-ready code

/* CSS */
color: #2a233f;
background-color: #2a233f;
/* Tailwind (arbitrary) */
class="text-[#2a233f] bg-[#2a233f]"
/* SCSS */
$brand: #2a233f;
/* SwiftUI */
Color(red: 0.165, green: 0.137, blue: 0.247)
/* Android */
Color.parseColor("#2a233f")
/* Flutter */
Color(0xFF2A233F)
/* Python / OpenCV (BGR) */
(63, 35, 42)

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

Accessibility — WCAG contrast

Aa
#2a233f on white: 14.89:1
AA ✓ pass · AA-large · AAA
Aa
#2a233f on black: 1.41:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #1B2840
deuteranopia · #1C273E
tritanopia · #25282E

Color scale — 50 to 950

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

#F6F6F9
#EEECF3
#DAD6E6
#BFB7D7
#9F93C3
#7F6FAF
#69579D
#574983
#463A69
#352D4D
#2a233f
Base = 950Lightest = 50 · #F6F6F9Darkest = 950 · #2a233f
:root {
  --brand-50: #F6F6F9;
  --brand-100: #EEECF3;
  --brand-200: #DAD6E6;
  --brand-300: #BFB7D7;
  --brand-400: #9F93C3;
  --brand-500: #7F6FAF;
  --brand-600: #69579D;
  --brand-700: #574983;
  --brand-800: #463A69;
  --brand-900: #352D4D;
  --brand-950: #2a233f;
  --brand: #2a233f;
  --brand-ink: #ffffff;
}

Colors that work with #2a233f

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#F6F5FA
Tinted page background
Border#D0CBE2
Hairlines and dividers
Muted text#625294
Captions on the surface
Accent#414121
Second voice, not a rival
Dark variant#372E52
Hover, pressed, headers
Light variant#F0EFF6
Selected rows, tints
Dark surface#181424
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 #2a233f

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#383F23
Analogous left#232A3F
Analogous right#38233F
Split-complement 1#3F3823
Split-complement 2#2A3F23
Triadic 1#3F2A23
Triadic 2#233F2A
Tetradic#3F232A

RGB percentages

Red16.5%
Green13.7%
Blue24.7%

CMYK percentages

Cyan33.3%
Magenta44.4%
Yellow0.0%
Key (black)75.3%

Color previews

#2a233f text on a black background

contrast 1.41:1

Card sample

#2a233f text on a white background

contrast 14.89:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(42, 35, 63, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(42, 35, 63, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2a233f;
background: linear-gradient(135deg, #2a233f, #3D233F);

Monochromatic scale

Palettes built from #2a233f

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.

#2a233f 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.

#2a233f, answered

What color is #2a233f?

#2a233f is a deep soft violet, closest to Midnight Blue (ΔE2000 14.1). It sits at 255° on the hue wheel with 29% saturation and 19% lightness, which reads as cool.

What is the RGB value of #2a233f?

rgb(42, 35, 63) — 42 red, 35 green and 63 blue out of 255, or 16.5% / 13.7% / 24.7% by channel.

Is #2a233f a light or a dark color?

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

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

White. It scores 14.89:1 against #2a233f, versus 1.41:1 for black — AAA at any size.

What is the complementary color of #2a233f?

#383F23 sits directly opposite on the wheel. Softer options are the split-complements #3F3823 and #2A3F23, which give the same contrast with far less vibration.

What colors go well with #2a233f?

For interface work: #F6F5FA as the surface, #D0CBE2 for borders, #625294 for secondary text, #414121 as an accent and #372E52 for hover and pressed states. For a palette, the analogous pair #232A3F and #38233F stays calm, while #383F23 is the loudest partner.

What is #2a233f in CMYK for printing?

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

Is #2a233f warm or cool?

Cool — it scores 70 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #34233F; nudged cooler, #222540.

Work with #2a233f in the Color Lab