Skip to content

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.

CornflowerBlue#6495ED

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

Color codes for CornflowerBlue
CSS keywordcornflowerblue
HEX#6495ED
RGBrgb(100, 149, 237)
HSLhsl(219, 79%, 66%)
HWBhwb(219 39% 7%)
OKLCHoklch(67.5% 0.141 261.3)
CMYK (naive, no ICC profile)cmyk(58%, 37%, 0%, 7%)
Decimal6,591,981
Hue familyBlues

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.

Contrast and accessibility
PairRatioAAAA largeAAAAAA largeAPCA Lc
Black text on cornflowerblue7.06:1PassPassPassPass47.9
White text on cornflowerblue2.97:1FailFailFailFail−61.5
Cornflowerblue text on white2.97:1FailFailFailFail56.1
Cornflowerblue text on black7.06:1PassPassPassPass−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)

  1. 5%
    #6c9aee
  2. 15%
    #7ba5f0
  3. 25%
    #8bb0f2
  4. 35%
    #9abaf3
  5. 45%
    #aac5f5
  6. 55%
    #b9cff7
  7. 65%
    #c9daf9
  8. 75%
    #d8e5fb
  9. 85%
    #e8effc
  10. 95%
    #f7fafe

Shades (mixed with black)

  1. 5%
    #5f8ee1
  2. 15%
    #557fc9
  3. 25%
    #4b70b2
  4. 35%
    #41619a
  5. 45%
    #375282
  6. 55%
    #2d436b
  7. 65%
    #233453
  8. 75%
    #19253b
  9. 85%
    #0f1624
  10. 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.

Color harmonies
HarmonyRotationColor
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

Nearest CSS named colors
ColorHEXΔE OK
dodgerblue#1e90ff5.9
steelblue#4682b410.2
mediumpurple#9370db10.4

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
blue-400#51a2ff4.4
indigo-400#7c86ff6.0
sky-500#00a6f47.1

Code snippets

CSS
.element {
  color: cornflowerblue;
  background-color: #6495ed;
  border-color: rgb(100 149 237);
  outline-color: oklch(67.5% 0.141 261.3);
}
Tailwind CSS
<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 */
SwiftUI
import SwiftUI

extension Color {
  static let cornflowerblue = Color(red: 0.392, green: 0.584, blue: 0.929)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

val Cornflowerblue = Color(0xFF6495ED)
Flutter
import 'package:flutter/material.dart';

const cornflowerblue = Color(0xFF6495ED);
Android XML
<!-- 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.