Olive hex and RGB values
The CSS keyword olive gives you #808000, or rgb(128, 128, 0).
Olive is a defined yellow-green in CSS. Keep the hex value beside the name when sharing a design, since fabric, paint and brand palettes use the word more loosely.
Compare black and white text
| Text / background | Ratio | AA normal | AA large | AAA normal | AAA large |
|---|---|---|---|---|---|
| #000000 / #808000 | 5.01:1 | Pass | Pass | Fail | Pass |
| #FFFFFF / #808000 | 4.20:1 | Fail | Pass | Fail | Fail |
Black text has the higher contrast on olive: 5.01:1. The table compares both options against all four text thresholds, using the unrounded values for pass or fail.
Try olive in a layout
The CSS sample below uses black text on #808000. Preview a 16 px label and a 24 px heading to compare normal and large text. Swap the colors to try olive as the text color; the ratio stays the same.
.sample {
background: #808000;
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.