HSL(245, 61%, 31%)
Blue — Blue color
Adjust Color
Color Information
Color Name
Blue
Color Family
Blue
Warm / Cool
🔵 Cool
Temperature
9000K
CSS Class
bg-[hsl(245,61%,31%)]
Color Conversions
| Format | Value | CSS Usage | |
|---|---|---|---|
| HSL | hsl(245, 61%, 31%) | color: hsl(245, 61%, 31%) | |
| HEX | #271F7F | color: #271F7F | |
| RGB | rgb(39, 31, 127) | color: rgb(39, 31, 127) | |
| CMYK | cmyk(69%, 76%, 0%, 50%) | — | |
| HSV | hsv(245, 76%, 50%) | — | |
| HWB | hwb(245 12% 50%) | color: hwb(245 12% 50%) | |
| OKLCH | oklch(0.3238 0.1533 277.23) | color: oklch(0.3238 0.1533 277.23) | |
| Lab | lab(19.81 34.9 -52.64) | color: lab(19.81 34.9 -52.64) | |
| LCH | lch(19.81 63.16 303.54) | color: lch(19.81 63.16 303.54) |
Color Theory
Accessibility (WCAG)
White text on color
Black text on color
Colored text
Contrast Ratios
AA Normal (4.5:1)
AA Large (3:1)
AAA Normal (7:1)
Best text on this color: white
Color Blindness Simulation
Protanopia (Red-blind)
#242368 — rgb(36, 35, 104)
Deuteranopia (Green-blind)
#242562 — rgb(36, 37, 98)
Tritanopia (Blue-blind)
#275551 — rgb(39, 85, 81)
Tints & Shades
CSS Code Snippets
background
background-color: hsl(245, 61%, 31%);
text
color: hsl(245, 61%, 31%);
border
border: 2px solid hsl(245, 61%, 31%);
gradient light
background: linear-gradient(to right, hsl(245, 61%, 51%), hsl(245, 61%, 31%));
gradient dark
background: linear-gradient(to right, hsl(245, 61%, 31%), hsl(245, 61%, 11%))
hex
background-color: #271F7F;
tailwind
bg-[hsl(245,61%,31%)]
box shadow
box-shadow: 0 4px 6px -1px hsl(245, 61%, 31%, 0.4);
css variable
--color-primary: hsl(245, 61%, 31%);
Related Colors
Use Cases for Blue
Frequently Asked Questions
What are all the color codes for HSL(245, 61%, 31%)?
HEX: #271F7F | RGB: rgb(39, 31, 127) | CMYK: 69%, 76%, 0%, 50% | HSV: 245°, 76%, 50%. Copy any format from the conversion table above.
What colors go well with #271F7F?
The complementary color is HSL(65, 61%, 31%). For a triadic harmony, use hues 245°, 5°, and 125°. For analogous combinations, try hues 215° and 275°. See the Color Harmony section above for complete palettes with previews.
How do I use HSL(245, 61%, 31%) in CSS?
As HSL: color: hsl(245, 61%, 31%); — As HEX: color: #271F7F; — As RGB: color: rgb(39, 31, 127); — Tailwind CSS: bg-[hsl(245,61%,31%)] — CSS variable: --color-primary: hsl(245, 61%, 31%);