Hex Color #021228 - Custom Color
Color Codes
HEX
#021228
RGB
rgb(2, 18, 40)
HSL
hsl(215, 90%, 8%)
CMYK
cmyk(95%, 55%, 0%, 84%)
HSV
hsv(215, 95%, 16%)
Color Name
Custom Color
Color Variations
Color Harmonies
Accessibility
WCAG Contrast Ratios
Text on White Background
Sample Text
Contrast Ratio: 18.75:1
Pass - WCAG AA (Normal Text)
Pass - WCAG AAA (Normal Text)
Text on Black Background
Sample Text
Contrast Ratio: 1.12:1
Fail - WCAG AA (Normal Text)
Fail - WCAG AAA (Normal Text)
Recommended Text Color
For best readability on this background color, use white text.
Similar Colors
Color in Use
Card with colored border
Background with 20% opacity
CSS Code
.element {
background-color: #021228;
color: #021228;
border-color: #021228;
}
Tailwind CSS (with arbitrary values)
bg-[#021228]
text-[#021228]
border-[#021228]
// Example usage:
<div className="bg-[#021228]">