Basic HTML and CSS color
Red #FF0000
Red (CSS keyword red) has the hex code #FF0000 and the RGB value rgb(255, 0, 0): a medium, vivid red.
Red (#ff0000) is the pure sRGB red primary and one of the 16 original HTML colors. Its contrast with white is only 3.99:1, so it fails WCAG AA for normal-size text.
Color codes for Red
| CSS keyword | red |
|---|---|
| HEX | #FF0000 |
| RGB | rgb(255, 0, 0) |
| HSL | hsl(0, 100%, 50%) |
| HWB | hwb(0 0% 0%) |
| OKLCH | oklch(62.8% 0.258 29.2) |
| CMYK (naive, no ICC profile) | cmyk(0%, 100%, 100%, 0%) |
| Decimal | 16,711,680 |
| Hue family | Reds |
Contrast and accessibility
On red, black text has a contrast ratio of 5.25:1 and passes AA for normal text; white text reaches 3.99:1.
WCAG 2.2 contrast ratios (success criteria 1.4.3 and 1.4.6: AA needs 4.5:1 for normal text and 3:1 for large text, AAA needs 7:1 and 4.5:1). APCA Lc is the lightness contrast from the APCA-W3 0.0.98G model proposed for WCAG 3; a higher absolute value is more readable, and Lc 75 is its suggested minimum for body text.
| Pair | Ratio | AA | AA large | AAA | AAA large | APCA Lc |
|---|---|---|---|---|---|---|
| Black text on red | 5.25:1 | Pass | Pass | Fail | Pass | 40.0 |
| White text on red | 3.99:1 | Fail | Pass | Fail | Fail | −69.6 |
| Red text on white | 3.99:1 | Fail | Pass | Fail | Fail | 64.1 |
| Red text on black | 5.25:1 | Pass | Pass | Fail | Pass | −37.5 |
Tints and shades
Each step mixes red with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, red, white 25%) in CSS.
Tints (mixed with white)
- 5%
#ff0d0d - 15%
#ff2626 - 25%
#ff4040 - 35%
#ff5959 - 45%
#ff7373 - 55%
#ff8c8c - 65%
#ffa6a6 - 75%
#ffbfbf - 85%
#ffd9d9 - 95%
#fff2f2
Shades (mixed with black)
- 5%
#f20000 - 15%
#d90000 - 25%
#bf0000 - 35%
#a60000 - 45%
#8c0000 - 55%
#730000 - 65%
#590000 - 75%
#400000 - 85%
#260000 - 95%
#0d0000
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, red's complementary color is #009CB2 (close to cadetblue), its analogous colors are #F50084 and #D06800, and its triadic partners are #00A836 and #5577FF. For text on top, black gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #009cb2 |
| Analogous | −30°, +30° | #f50084#d06800 |
| Triadic | +120°, +240° | #00a836#5577ff |
| Split-complementary | +150°, +210° | #00a28a#0092e2 |
Computed in OKLCH: the hue is rotated by 180° (complementary), ±30° (analogous), ±120° (triadic) and 180° ±30° (split-complementary) while lightness and chroma stay fixed. Results that fall outside sRGB are brought back with the CSS Color 4 gamut mapping algorithm. Because this uses OKLCH, the values differ from tools that rotate hue in HSL, but every color keeps the same perceived lightness.
Warm or cool?
Red is a warm color: its hue is 0° on the HSL wheel, in the red, orange and yellow range (0° to about 70°, plus reds above 330°) that is conventionally called warm.
Nearest named and Tailwind colors
Distance is ΔE OK, the Euclidean distance in OKLab multiplied by 100. Values under about 2 are hard to tell apart side by side.
Code snippets
.element {
color: red;
background-color: #ff0000;
border-color: rgb(255 0 0);
outline-color: oklch(62.8% 0.258 29.2);
}<div class="bg-[#ff0000] text-black">...</div>
/* or register it once in your CSS (Tailwind v4) */
@theme {
--color-red: #ff0000;
}
/* then use bg-red, text-red, border-red */import SwiftUI
extension Color {
static let red = Color(red: 1.000, green: 0.000, blue: 0.000)
}import androidx.compose.ui.graphics.Color
val Red = Color(0xFFFF0000)import 'package:flutter/material.dart';
const red = Color(0xFFFF0000);<!-- res/values/colors.xml -->
<color name="red">#FF0000</color>Frequently asked questions
- What is the hex code for red?
- The hex code for red is #FF0000. The same color is rgb(255, 0, 0), hsl(0, 100%, 50%) and oklch(62.8% 0.258 29.2), and in CSS you can also write the keyword red directly.
- Is red a warm or cool color?
- Red is a warm color: its hue is 0° on the HSL wheel, in the red, orange and yellow range (0° to about 70°, plus reds above 330°) that is conventionally called warm.
- What colors go with red?
- Rotating the hue in OKLCH while keeping lightness and chroma, red's complementary color is #009CB2 (close to cadetblue), its analogous colors are #F50084 and #D06800, and its triadic partners are #00A836 and #5577FF. For text on top, black gives the higher contrast.
- Can you use white text on red?
- White text on red has a contrast ratio of 3.99:1, which passes AA only for large text (24 px, or 18.66 px bold, and up) under WCAG 2.2. Black text reaches 5.25:1 and passes AA for normal text but not AAA. In APCA terms that is Lc −69.6 for white and Lc 40.0 for black.
- What is the RGB value of red?
- Red is rgb(255, 0, 0): red 255, green 0 and blue 0 on the 0 to 255 scale, or 100.0%, 0.0% and 0.0%. As a decimal integer it is 16711680.
Last reviewed by Arielton Oberek.