Red hex and RGB values
The CSS keyword red gives you #FF0000, or rgb(255, 0, 0).
Pure red draws attention to a warning, but red text on white falls short of AA for normal text. Add a clear message or icon so the color does not have to carry the meaning alone.
Compare black and white text
| Text / background | Ratio | AA normal | AA large | AAA normal | AAA large |
|---|---|---|---|---|---|
| #000000 / #FF0000 | 5.25:1 | Pass | Pass | Fail | Pass |
| #FFFFFF / #FF0000 | 4.00:1 | Fail | Pass | Fail | Fail |
Black text has the higher contrast on red: 5.25:1. The table compares both options against all four text thresholds, using the unrounded values for pass or fail.
Try red in a layout
The CSS sample below uses black text on #FF0000. Preview a 16 px label and a 24 px heading to compare normal and large text. Swap the colors to try red as the text color; the ratio stays the same.
.sample {
background: #FF0000;
color: #000000;
}Copy the exact color
Use the converter to copy HEX, RGB or HSL. If you edit in HSL, the final value is rounded to eight-bit sRGB so the preview and exported color agree. For text over an image, gradient or translucent layer, check the finished design separately.