staticdata.dev
Menu
Datasets About Contact

CSS Named Colors

All 148 CSS `<named-color>` keywords, from aliceblue to yellowgreen, including the synonyms like cyan/aqua and grey/gray. Each entry gives the canonical lowercase name, the hex value, and the RGB triplet.

v1.0.0 MIT 148 records Updated 2026-10-05 stable Source:  CSS Color Module Level 4 — Named Colors

Quick fetch

Stable URL. CORS-enabled. No auth.

bash
curl https://staticdata.dev/v1/css-named-colors.json

Or use as a typed import: import { cssNamedColors } from "https://staticdata.dev/v1/css-named-colors.ts"

Formats

  • JSON 15.3 KB

    /v1/css-named-colors.json

    Open

    min: 8.1 KB · /v1/css-named-colors.min.json

  • CSV 4.3 KB

    /v1/css-named-colors.csv

    Open
  • TypeScript 15.5 KB

    /v1/css-named-colors.ts

    export const cssNamedColors

    type CssNamedColor = (typeof cssNamedColors)[number]

    Open

Schema

Each record in the dataset has the following shape.

Schema
Field Type Description Example
name string Lowercase CSS color keyword rebeccapurple
hex string Hex color value #663399
rgb number[] [red, green, blue], each 0–255 [102,51,153]

Preview

First 10 records.

Data preview
namehex
aliceblue#f0f8ff
antiquewhite#faebd7
aqua#00ffff
aquamarine#7fffd4
azure#f0ffff
beige#f5f5dc
bisque#ffe4c4
black#000000
blanchedalmond#ffebcd
blue#0000ff

Showing 10 of 148. View full data:  JSON · CSV

Fetch examples

Drop-in snippets in five languages.

curl
curl -sSL https://staticdata.dev/v1/css-named-colors.json | jq '.[0]'
JavaScript
import type { CssNamedColor } from "https://staticdata.dev/v1/css-named-colors.ts";

const res = await fetch("https://staticdata.dev/v1/css-named-colors.min.json");
if (!res.ok) throw new Error(`Fetch failed: ${res.status}`);
const cssNamedColors: CssNamedColor[] = await res.json();
console.log(cssNamedColors[0]);
Python
import urllib.request, json

with urllib.request.urlopen("https://staticdata.dev/v1/css-named-colors.min.json") as r:
    cssNamedColors = json.load(r)

print(cssNamedColors[0])
Go
package main

import (
	"encoding/json"
	"fmt"
	"net/http"
)

func main() {
	resp, err := http.Get("https://staticdata.dev/v1/css-named-colors.min.json")
	if err != nil { panic(err) }
	defer resp.Body.Close()

	var data []map[string]any
	if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
		panic(err)
	}
	fmt.Println(data[0])
}
Rust
use serde_json::Value;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let body = ureq::get("https://staticdata.dev/v1/css-named-colors.min.json").call()?.into_string()?;
    let data: Vec<Value> = serde_json::from_str(&body)?;
    println!("{:?}", data.first());
    Ok(())
}

Sources and methodology

These are the named color keywords defined by CSS Color Module Level 4. The list originates in the X11 color names, was standardized through SVG and CSS, and is stable — rebeccapurple (added in CSS Color 4) is the most recent addition.

The hex values are canonical and the rgb triplets are derived from them. Several names are exact synonyms that resolve to the same value: aqua/cyan, fuchsia/magenta, and the gray/grey spelling pairs (including darkgray/darkgrey, slategray/slategrey, and so on). All names are kept so a lookup by either spelling succeeds. CSS color keywords are case-insensitive; they are stored lowercase here. The special keywords transparent and currentcolor and the CSS system colors (Canvas, ButtonText, …) are not <named-color> values and are not included.

Versioning

URLs under /v1/ are stable: field names and types will not change in a way that breaks consumers. Values can be corrected or records added when the upstream source changes; schema-incompatible updates ship under a new version path. See the css-named-colors changelog for this dataset's history.

Related datasets

More Code datasets