HSL(5, 40%, 18%)
Red — Red color
Adjust Color
Color Information
Color Name
Red
Color Family
Red
Warm / Cool
🔴 Warm
Temperature
2000K
CSS Class
bg-[hsl(5,40%,18%)]
Color Conversions
| Format | Value | CSS Usage | |
|---|---|---|---|
| HSL | hsl(5, 40%, 18%) | color: hsl(5, 40%, 18%) | |
| HEX | #401F1C | color: #401F1C | |
| RGB | rgb(64, 31, 28) | color: rgb(64, 31, 28) | |
| CMYK | cmyk(0%, 52%, 56%, 75%) | — | |
| HSV | hsv(5, 56%, 25%) | — | |
| HWB | hwb(5 11% 75%) | color: hwb(5 11% 75%) | |
| OKLCH | oklch(0.2842 0.0518 26.26) | color: oklch(0.2842 0.0518 26.26) | |
| Lab | lab(16.28 15.56 9.18) | color: lab(16.28 15.56 9.18) | |
| LCH | lch(16.28 18.07 30.54) | color: lch(16.28 18.07 30.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)
#32311D — rgb(50, 49, 29)
Deuteranopia (Green-blind)
#34361D — rgb(52, 54, 29)
Tritanopia (Blue-blind)
#3E1D1D — rgb(62, 29, 29)
Tints & Shades
CSS Code Snippets
background
background-color: hsl(5, 40%, 18%);
text
color: hsl(5, 40%, 18%);
border
border: 2px solid hsl(5, 40%, 18%);
gradient light
background: linear-gradient(to right, hsl(5, 40%, 38%), hsl(5, 40%, 18%));
gradient dark
background: linear-gradient(to right, hsl(5, 40%, 18%), hsl(5, 40%, 0%))
hex
background-color: #401F1C;
tailwind
bg-[hsl(5,40%,18%)]
box shadow
box-shadow: 0 4px 6px -1px hsl(5, 40%, 18%, 0.4);
css variable
--color-primary: hsl(5, 40%, 18%);
Related Colors
Use Cases for Red
Frequently Asked Questions
What are all the color codes for HSL(5, 40%, 18%)?
HEX: #401F1C | RGB: rgb(64, 31, 28) | CMYK: 0%, 52%, 56%, 75% | HSV: 5°, 56%, 25%. Copy any format from the conversion table above.
What colors go well with #401F1C?
The complementary color is HSL(185, 40%, 18%). For a triadic harmony, use hues 5°, 125°, and 245°. For analogous combinations, try hues 335° and 35°. See the Color Harmony section above for complete palettes with previews.
How do I use HSL(5, 40%, 18%) in CSS?
As HSL: color: hsl(5, 40%, 18%); — As HEX: color: #401F1C; — As RGB: color: rgb(64, 31, 28); — Tailwind CSS: bg-[hsl(5,40%,18%)] — CSS variable: --color-primary: hsl(5, 40%, 18%);