Skip to content

#31157E Color

#31157E is rgb(49, 21, 126) in RGB, hsl(256, 71%, 29%) in HSL, and about cmyk(61%, 83%, 0%, 51%) in CMYK. It has no registered color name of its own — the closest is Persian Indigo (#32127A), below the threshold most people can see at ΔE 1.6. White text is the more readable choice on this background.

#31157E
HEX#31157E
RGBrgb(49, 21, 126)
HSLhsl(256, 71%, 29%)
HSVhsv(256, 83%, 49%)
CMYKcmyk(61%, 83%, 0%, 51%)
OKLCHoklch(31.9% 0.16 285)
LABlab(17.85% 35.59 -54.97)
LCHlch(17.85% 65.48 302.92)

What #31157E Is Called

Most hex codes have no name: there are 16.7 million of them and a few thousand registered names. These are the named colors nearest to #31157E, ordered by CIE76 distance in CIELAB. Anything under about ΔE 2 is a difference most people cannot see.

Browse the full index of named colors A-Z or every purple in the library.

#31157E Channel Values

How #31157E breaks down in each color model. Hue is measured in degrees around the color wheel; saturation, lightness, and the CMYK inks are percentages.

ModelChannelsNotes
RGBR 49 · G 21 · B 1268-bit channels as sent to the display
HSLH 256° · S 71% · L 29%Easiest model for building lighter and darker variants
HSVH 256° · S 83% · V 49%Matches the picker in most design tools
CMYKC 61% · M 83% · Y 0% · K 51%Approximate ink mix; confirm with an ICC profile before printing
Luminance13.64:1 vs white · 1.54:1 vs blackWCAG 2.2 relative-luminance contrast ratios

Text Contrast & Accessibility

WCAG 2.2 contrast ratios for text on a #31157E background. AA requires 4.5:1 for normal text and 3:1 for large text; AAA requires 7:1. Contrast is one check, not a full accessibility review.

TextWhite text13.64:1AA normal AA large AAA normal
Fails AABlack text1.54:1AA normal AA large AAA normal

Need a specific ratio against another background? Open #31157E in the contrast checker.

Colors That Go With #31157E

Pairings derived from color-wheel relationships. The complementary color sits opposite #31157E; analogous colors sit beside it; triadic and split-complementary sets spread evenly around the wheel. Select any swatch for its own breakdown.

Base
Complementary
Analogous
Analogous
Triadic
Triadic
Split comp.
Split comp.

Tints & Shades of #31157E

Lighter tints and darker shades built by moving the lightness channel while holding hue and saturation, which is what you want for hover states, backgrounds, and text variants.

Tints

Shades

Want a full 50-950 ramp with semantic roles? Generate design tokens from #31157E.

How #31157E Looks with Color Vision Deficiency

Simulated with the Viénot, Brettel & Mollon LMS projection model. Anomalous types are rendered as partial versions of the matching dichromacy, which is an approximation rather than a per-person clinical model.

Typical#31157E
Protanopia#1C1C7E
Protanomaly#26197E
Deuteranopia#21217E
Deuteranomaly#281D7E
Tritanopia#103333
Tritanomaly#212A5A
Achromatopsia#2E2E2E

Test a full palette in the color blindness simulator.

Using #31157E in Code

Copy-ready declarations for the places this color usually ends up.

CSS custom property--color-31157e: #31157E;
CSS backgroundbackground-color: #31157E;
Tailwind configcolors: { 'color-31157e': '#31157E' }
SwiftUIColor(red: 0.192, green: 0.082, blue: 0.494)
Android XML<color name="color_31157e">#31157E</color>
SVG fillfill="#31157E"

More Purple Colors

#31157E sits in the purple family. These are its neighbours across that family's full range, each with its own breakdown.

#31157E Frequently Asked Questions

What color is #31157E?

#31157E is a dark purple — rgb(49, 21, 126) in RGB and hsl(256, 71%, 29%) in HSL. It carries no registered color name of its own; the closest named color is Persian Indigo (#32127A), which is below the threshold most people can see at a CIE76 distance of 1.6.

What is the RGB value of #31157E?

#31157E is rgb(49, 21, 126) — red 49, green 21, and blue 126 on the 0-255 scale.

What is the CMYK value of #31157E?

#31157E converts to approximately cmyk(61%, 83%, 0%, 51%). CMYK output is a mathematical approximation for planning; confirm production print colors with your printer and ICC profile.

Should text on #31157E be black or white?

White text is the more readable choice. #31157E scores 13.64:1 against white and 1.54:1 against black, and WCAG 2.2 asks for at least 4.5:1 for normal body text.

Can I write #31157E as a CSS color keyword?

No. #31157E is not one of the CSS color keywords, so it has to be written as a hex, rgb() or hsl() value. The closest keyword is midnightblue (#191970) at a CIE76 distance of 10.86, which is visibly different.

Open #31157E in a Tool

Keep exploring: every purple in the color library, the guide to shades of purple, or the full color library.