CSS named color
CornflowerBlue #6495ED
CornflowerBlue (CSS keyword cornflowerblue) has the hex code #6495ED and the RGB value rgb(100, 149, 237): a medium, moderately saturated blue.
Named after the cornflower (Centaurea cyanus), a wildflower with vivid blue petals. Game developers know it as the default clear color of Microsoft XNA project templates.
Color codes for CornflowerBlue
| CSS keyword | cornflowerblue |
|---|---|
| HEX | #6495ED |
| RGB | rgb(100, 149, 237) |
| HSL | hsl(219, 79%, 66%) |
| HWB | hwb(219 39% 7%) |
| OKLCH | oklch(67.5% 0.141 261.3) |
| CMYK (naive, no ICC profile) | cmyk(58%, 37%, 0%, 7%) |
| Decimal | 6,591,981 |
| Hue family | Blues |
Contrast and accessibility
On cornflowerblue, black text has a contrast ratio of 7.06:1 and passes AAA at any text size; white text reaches 2.97: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 cornflowerblue | 7.06:1 | Pass | Pass | Pass | Pass | 47.9 |
| White text on cornflowerblue | 2.97:1 | Fail | Fail | Fail | Fail | −61.5 |
| Cornflowerblue text on white | 2.97:1 | Fail | Fail | Fail | Fail | 56.1 |
| Cornflowerblue text on black | 7.06:1 | Pass | Pass | Pass | Pass | −45.7 |
Tints and shades
Each step mixes cornflowerblue with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, cornflowerblue, white 25%) in CSS.
Tints (mixed with white)
- 5%
#6c9aee - 15%
#7ba5f0 - 25%
#8bb0f2 - 35%
#9abaf3 - 45%
#aac5f5 - 55%
#b9cff7 - 65%
#c9daf9 - 75%
#d8e5fb - 85%
#e8effc - 95%
#f7fafe
Shades (mixed with black)
- 5%
#5f8ee1 - 15%
#557fc9 - 25%
#4b70b2 - 35%
#41619a - 45%
#375282 - 55%
#2d436b - 65%
#233453 - 75%
#19253b - 85%
#0f1624 - 95%
#05070c
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, cornflowerblue's complementary color is #C28C00 (close to darkgoldenrod), its analogous colors are #00A4DD and #9885E6, and its triadic partners are #E06F70 and #61AC56. For text on top, black gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #c28c00 |
| Analogous | −30°, +30° | #00a4dd#9885e6 |
| Triadic | +120°, +240° | #e06f70#61ac56 |
| Split-complementary | +150°, +210° | #da7a3b#9a9e1b |
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?
CornflowerBlue is a cool color: its hue is 219° on the HSL wheel, in the green, blue and violet range that is conventionally called cool.
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.
Nearest CSS named colors
| Color | HEX | ΔE OK |
|---|---|---|
| dodgerblue | #1e90ff | 5.9 |
| steelblue | #4682b4 | 10.2 |
| mediumpurple | #9370db | 10.4 |
Nearest Tailwind v4 colors
| Color | HEX | ΔE OK |
|---|---|---|
| blue-400 | #51a2ff | 4.4 |
| indigo-400 | #7c86ff | 6.0 |
| sky-500 | #00a6f4 | 7.1 |
Code snippets
.element {
color: cornflowerblue;
background-color: #6495ed;
border-color: rgb(100 149 237);
outline-color: oklch(67.5% 0.141 261.3);
}<div class="bg-[#6495ed] text-black">...</div>
/* or register it once in your CSS (Tailwind v4) */
@theme {
--color-cornflowerblue: #6495ed;
}
/* then use bg-cornflowerblue, text-cornflowerblue, border-cornflowerblue */import SwiftUI
extension Color {
static let cornflowerblue = Color(red: 0.392, green: 0.584, blue: 0.929)
}import androidx.compose.ui.graphics.Color
val Cornflowerblue = Color(0xFF6495ED)import 'package:flutter/material.dart';
const cornflowerblue = Color(0xFF6495ED);<!-- res/values/colors.xml -->
<color name="cornflowerblue">#6495ED</color>Frequently asked questions
- What is the hex code for cornflowerblue?
- The hex code for cornflowerblue is #6495ED. The same color is rgb(100, 149, 237), hsl(219, 79%, 66%) and oklch(67.5% 0.141 261.3), and in CSS you can also write the keyword cornflowerblue directly.
- Is cornflowerblue a warm or cool color?
- CornflowerBlue is a cool color: its hue is 219° on the HSL wheel, in the green, blue and violet range that is conventionally called cool.
- What colors go with cornflowerblue?
- Rotating the hue in OKLCH while keeping lightness and chroma, cornflowerblue's complementary color is #C28C00 (close to darkgoldenrod), its analogous colors are #00A4DD and #9885E6, and its triadic partners are #E06F70 and #61AC56. For text on top, black gives the higher contrast.
- Can you use white text on cornflowerblue?
- White text on cornflowerblue has a contrast ratio of 2.97:1, which fails AA even for large text under WCAG 2.2. Black text reaches 7.06:1 and passes both AA and AAA. In APCA terms that is Lc −61.5 for white and Lc 47.9 for black.
- What is the RGB value of cornflowerblue?
- CornflowerBlue is rgb(100, 149, 237): red 100, green 149 and blue 237 on the 0 to 255 scale, or 39.2%, 58.4% and 92.9%. As a decimal integer it is 6591981.
Last reviewed by Arielton Oberek.