Free tool · Color palettes · Runs in your browser
Color palette for blue
Short answer
Blue is #0000FF: the CSS color named blue, defined by the W3C, written rgb(0, 0, 255) or hsl(240, 100%, 50%). Its complement is #FFFF00; analogous colors are #0080FF and #8000FF; a triad adds #FF0000 and #00FF00.
#0000FF · rgb(0, 0, 255) · hsl(240, 100%, 50%) · contrast 8.59:1 on white, 2.44:1 on black
Complementary
Analogous
Triadic
Split complementary
Tetradic (rectangle)
Square
Tints (toward white)
Shades (toward black)
CSS variables for the analogous palette
:root {
--color-1: #0080ff;
--color-2: #0000ff;
--color-3: #8000ff;
}Nothing is uploaded. Click a color to copy its hex code.
Key takeaways
- Blue is #0000FF, rgb(0, 0, 255), hsl(240, 100%, 50%), CIELAB 32.3, 79.2, -107.9.
- Contrast: 8.6:1 on white and 2.4:1 on black. White text on blue passes the WCAG AA minimum of 4.5:1.
- Its complement is #FFFF00; the analogous colors are #0080FF and #8000FF; the triad is #0000FF, #FF0000, #00FF00.
- 3 of the 9 tints and 9 of the 9 shades have at least 4.5:1 on a white background; the first shade that does is #0000E6.
- Photographs rich in blue gave #5688BF, #7C93CB, #7E9EEF, #5B75D4, #A0BEF2, #30478C; the nearest of their colors to #0000FF was 20.5 CIEDE2000 units away.
- For people with deuteranopia the closest pair in the triad is 19.4 apart, against 52.9 for typical vision.
Measured: a palette for blue, from photographs
On white it has a contrast ratio of 8.6:1 (passes the WCAG AA minimum of 4.5:1 for normal text) and on black 2.4:1. A palette extracted from three photographs rich in blue (91%, 84% and 73% of their pixels near the hue) came out as #5688BF, #7C93CB, #7E9EEF, #5B75D4, #A0BEF2, #30478C.
We searched Wikimedia Commons for blue subjects and kept photographs under Creative Commons or public domain licenses. Of 30 candidates we kept the three with the largest share of pixels within 30 degrees of the hue of the color, with saturation of at least 30% and lightness between 20% and 85%. The tool's own palette code (k-means in CIELAB, no random numbers) found five colors in each photograph. The six colors in the table below come from only the pixels inside the color window, from the three photographs, so they are six shades and neighbors of blue rather than the whole picture.
| Color | Share | Nearest CSS name | Contrast on white | Contrast on black |
|---|---|---|---|---|
| #5688BF | 37.9% | near steelblue | 3.70:1 | 5.67:1 |
| #7C93CB | 36.0% | near cornflowerblue | 3.05:1 | 6.89:1 |
| #7E9EEF | 8.7% | near cornflowerblue | 2.62:1 | 8.02:1 |
| #5B75D4 | 7.5% | near royalblue | 4.25:1 | 4.94:1 |
| #A0BEF2 | 5.5% | near lightsteelblue | 1.88:1 | 11.14:1 |
| #30478C | 4.4% | near darkslateblue | 8.73:1 | 2.41:1 |
Blue appears here as near steelblue, near cornflowerblue, near cornflowerblue, near royalblue, near lightsteelblue, near darkslateblue. The photo palette is a starting point: colors from a photograph are rarely pure, and the table shows how each performs as text on white and black.
Measured: the photographs
| Photograph | Photographer, license | Pixels near the hue | Five colors |
|---|---|---|---|
| Clear sky over Riga, 2008 | Mee2ch, CC BY 3.0 | 91% | #5185BC 38%, #5A8BBF 26%, #5387C3 19%, #6294C6 16%, #497BB4 1% |
| Clear blue sky, Boyolali | Rinai Natsumi, CC BY-SA 4.0 | 84% | #7A92CA 84%, #111715 9%, #293323 4%, #3C4A64 2%, #475829 2% |
| Hydrangea macrophylla - Hortensia hydrangea | Raul654, CC BY-SA 3.0 | 73% | #5A74C8 45%, #9FBBEF 37%, #112125 11%, #5C7077 6%, #3E6633 2% |
The photographs are credited with their Wikimedia Commons license. The extracted lists are the exact tool output.
Colors that go with blue
| Harmony | Colors | Closest pair, typical vision | Protanopia | Deuteranopia | Tritanopia |
|---|---|---|---|---|---|
| Complementary | #0000FF, #FFFF00 | 103.4 | 87.3 | 94.0 | 51.0 |
| Analogous | #0080FF, #0000FF, #8000FF | 9.2 | 3.2 | 8.5 | 14.0 |
| Triadic | #0000FF, #FF0000, #00FF00 | 52.9 | 42.4 | 19.4 | 46.6 |
| Split complementary | #0000FF, #FF8000, #80FF00 | 58.1 | 23.3 | 12.1 | 46.4 |
| Tetradic (rectangle) | #0000FF, #FF00FF, #FFFF00, #00FF00 | 23.4 | 4.1 | 8.7 | 30.7 |
| Square | #0000FF, #FF0080, #FFFF00, #00FF80 | 27.7 | 8.6 | 14.0 | 30.7 |
The complement, #FFFF00, sits opposite #0000FF on the color wheel (hue + 180 degrees); Wikipedia's color scheme article describes analogous schemes as neighbors on the wheel and a triadic scheme as colors 120 and 240 degrees apart. Under protanopia, deuteranopia and tritanopia the colors are simulated with the Machado model at full severity; a closest pair below about 10 is hard to tell apart.
Blue in numbers
| Notation | Value |
|---|---|
| Hex | #0000FF |
| RGB | rgb(0, 0, 255) |
| HSL | hsl(240.0, 100.0%, 50.0%) |
| CMYK (simple conversion) | 100%, 100%, 0%, 0% |
| CIELAB (D65) | 32.3, 79.2, -107.9 |
| Nearest CSS color name | blue #0000FF (exact) |
| Contrast on white | 8.59:1 |
| Contrast on black | 2.44:1 |
Tints, shades and accessible text
| Step | Tint (toward white) | Contrast on white | Shade (toward black) | Contrast on white |
|---|---|---|---|---|
| 10% | #1A1AFF | 7.97:1 | #0000E6 | 9.80:1 |
| 20% | #3333FF | 6.87:1 | #0000CC | 11.22:1 |
| 30% | #4D4DFF | 5.50:1 | #0000B3 | 12.72:1 |
| 40% | #6666FF | 4.28:1 | #000099 | 14.38:1 |
| 50% | #8080FF | 3.26:1 | #000080 | 16.01:1 |
| 60% | #9999FF | 2.51:1 | #000066 | 17.62:1 |
| 70% | #B3B3FF | 1.94:1 | #00004D | 18.97:1 |
| 80% | #CCCCFF | 1.54:1 | #000033 | 20.04:1 |
| 90% | #E6E6FF | 1.23:1 | #00001A | 20.69:1 |
3 tints and 9 shades reach 4.5:1 against white. The WCAG success criterion 1.4.3 asks for at least 4.5:1 for normal text and 3:1 for large text; criterion 1.4.6 asks for 7:1 for the enhanced level.
Use it in CSS
:root { --blue-1: #5688bf; --blue-2: #7c93cb; --blue-3: #7e9eef; --blue-4: #5b75d4; --blue-5: #a0bef2; --blue-6: #30478c; }
The complement and analogous colors of #0000FF: #FFFF00, #0080FF, #8000FF.
Free tools:Color palette generatorPalette from an imageImage to textCompress an image
Check the contrast before you use it for text
- Blue #0000FF on white: 8.59:1; on black: 2.44:1.
- The darkest shade in the table, #00001A, reaches 20.69:1 on white.
- Large text (at least 18 point, or 14 point bold) needs 3:1; normal text needs 4.5:1; the enhanced level needs 7:1.
- Do not use color as the only way to tell things apart: about 1 in 12 men have a color vision deficiency.
How the numbers were made
The hex value of blue is the W3C CSS named color. Harmonies rotate the hue in HSL and keep saturation and lightness. Contrast follows the WCAG 2 definition with relative luminance. Color differences use CIEDE2000, which Wikipedia notes is designed so that a difference of 1.0 stands for a just noticeable difference. Color blindness is simulated with the matrices of Machado, Oliveira and Fernandes (2009) at severity 1.0. Palette extraction: pixels are grouped into 32 levels per channel and clustered with k-means in CIELAB; the same picture always gives the same palette. The accuracy test on pictures of known colors is on the palette generator page.
Questions people ask
What is the hex code for blue?
Blue is #0000FF (the W3C CSS named color), rgb(0, 0, 255).
What color goes with blue?
The complement of #0000FF is #FFFF00. Analogous colors are #0080FF and #8000FF; a triad is #0000FF, #FF0000, #00FF00.
Is #0000FF accessible for text?
On white it has 8.59:1 and on black 2.44:1. The WCAG AA minimum for normal text is 4.5:1, so white text on #0000FF passes.
Can people with color blindness tell the blue palette apart?
For the six colors of the photo palette, the closest pair is 5.5 apart for typical vision and 5.8 for deuteranopia (CIEDE2000; below about 10 is hard).
How was the palette made?
The tool found the dominant colors of the photographs with k-means clustering in CIELAB. It runs in your browser; you can do the same with your own picture on the palette from image page.
Can I use these colors commercially?
Colors themselves are not licensed. The photographs used to find them keep their Creative Commons licenses, shown in the table.
Can I get a palette from my own photo?
Yes. Use the palette from an image tool; nothing is uploaded.
How many colors should a palette have?
Many designs use five: one dominant, one or two supporting, one accent and a neutral. The tool lets you choose 3 to 10 when you extract from a picture.
What is the difference between tints and shades?
A tint mixes the color with white and a shade mixes it with black. The table shows nine of each in steps of 10%.
Related
Sources and how we checked
- W3C: CSS Color Module Level 4 (named colors) (read 2026-10-10)
- W3C: Understanding Success Criterion 1.4.3, Contrast (Minimum) (read 2026-10-10)
- W3C: Understanding Success Criterion 1.4.6, Contrast (Enhanced) (read 2026-10-10)
- Wikipedia: Color scheme (read 2026-10-10)
- Wikipedia: Color difference (CIEDE2000) (read 2026-10-10)
- Machado, Oliveira and Fernandes: A physiologically-based model for simulation of color vision deficiency (2009) (read 2026-10-10)
- Wikimedia Commons (the photographs, under the licenses shown) (read 2026-10-10)
Reviewed October 10, 2026. The palettes were found with the tool's own code from Creative Commons photographs; contrast, harmonies and color differences are computed. The files and results are in data/seo/hub/evidence/2026-10-10/palette.