{
  "profile": "tabular-data-package",
  "name": "css-named-color-contrast-pairs",
  "id": "https://auricartisan.com/datasets/contrast-pairs/1.0.0/",
  "title": "CSS named color contrast pairs",
  "description": "Every CSS named color (CSS Color Module Level 4) as text on every CSS named color as background: 21,904 ordered pairs with the WCAG 2 contrast ratio and its AA and AAA verdicts, the APCA lightness contrast (APCA-W3 0.0.98G-4g) and the CIEDE2000 color difference.",
  "version": "1.0.0",
  "created": "2026-10-11",
  "homepage": "https://auricartisan.com/datasets/contrast-pairs/",
  "keywords": [
    "color contrast",
    "WCAG",
    "APCA",
    "CIEDE2000",
    "CSS named colors",
    "accessibility"
  ],
  "licenses": [
    {
      "name": "CC-BY-4.0",
      "path": "https://creativecommons.org/licenses/by/4.0/",
      "title": "Creative Commons Attribution 4.0 International"
    }
  ],
  "contributors": [
    {
      "title": "Auric Artisan",
      "path": "https://auricartisan.com/",
      "role": "author"
    }
  ],
  "sources": [
    {
      "title": "CSS Color Module Level 4: named colors",
      "path": "https://www.w3.org/TR/css-color-4/#named-colors"
    }
  ],
  "resources": [
    {
      "name": "contrast-pairs",
      "path": "contrast-pairs.csv",
      "profile": "tabular-data-resource",
      "format": "csv",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "bytes": 1569239,
      "hash": "sha256:b62bd82983c3730bfa82764cc7150f6009f50fbbc2dd19eb0c9cf9d32fe3181c",
      "dialect": {
        "delimiter": ",",
        "header": true,
        "lineTerminator": "\n"
      },
      "schema": {
        "fields": [
          {
            "name": "text_name",
            "type": "string",
            "description": "The text (foreground) color’s name."
          },
          {
            "name": "text_hex",
            "type": "string",
            "description": "The text color’s sRGB value."
          },
          {
            "name": "background_name",
            "type": "string",
            "description": "The background color’s name."
          },
          {
            "name": "background_hex",
            "type": "string",
            "description": "The background color’s sRGB value."
          },
          {
            "name": "wcag_ratio",
            "type": "number",
            "description": "WCAG 2 contrast ratio, 1 to 21, to four decimals. The same in both directions."
          },
          {
            "name": "wcag_aa",
            "type": "boolean",
            "description": "Ratio at least 4.5: WCAG 2 AA for body text (1.4.3), and AAA for large text (1.4.6)."
          },
          {
            "name": "wcag_aa_large",
            "type": "boolean",
            "description": "Ratio at least 3: AA for large text (1.4.3), and the 3:1 for interface parts and graphics (1.4.11)."
          },
          {
            "name": "wcag_aaa",
            "type": "boolean",
            "description": "Ratio at least 7: WCAG 2 AAA for body text (1.4.6)."
          },
          {
            "name": "apca_lc",
            "type": "number",
            "description": "APCA lightness contrast of this text on this background, to two decimals. Positive for dark text on a light background, negative for light on dark."
          },
          {
            "name": "delta_e_2000",
            "type": "number",
            "description": "CIEDE2000 color difference in CIELAB (D65), to two decimals. The same in both directions."
          }
        ],
        "primaryKey": [
          "text_name",
          "background_name"
        ],
        "foreignKeys": [
          {
            "fields": "text_name",
            "reference": {
              "resource": "colors",
              "fields": "name"
            }
          },
          {
            "fields": "background_name",
            "reference": {
              "resource": "colors",
              "fields": "name"
            }
          }
        ]
      }
    },
    {
      "name": "colors",
      "path": "colors.csv",
      "profile": "tabular-data-resource",
      "format": "csv",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "bytes": 8785,
      "hash": "sha256:103f337060a04008472ff90a1c0b771bcba6fca031cd3e5dc381bc81756a7e7e",
      "dialect": {
        "delimiter": ",",
        "header": true,
        "lineTerminator": "\n"
      },
      "schema": {
        "fields": [
          {
            "name": "name",
            "type": "string",
            "description": "The CSS named color, lowercase, as CSS Color Module Level 4 lists it."
          },
          {
            "name": "hex",
            "type": "string",
            "description": "Its sRGB value as #RRGGBB."
          },
          {
            "name": "r",
            "type": "integer",
            "description": "Red, 0 to 255."
          },
          {
            "name": "g",
            "type": "integer",
            "description": "Green, 0 to 255."
          },
          {
            "name": "b",
            "type": "integer",
            "description": "Blue, 0 to 255."
          },
          {
            "name": "relative_luminance",
            "type": "number",
            "description": "WCAG 2 relative luminance, 0 (black) to 1 (white), to six decimals."
          },
          {
            "name": "oklch_l",
            "type": "number",
            "description": "OKLCH lightness, 0 to 1."
          },
          {
            "name": "oklch_c",
            "type": "number",
            "description": "OKLCH chroma."
          },
          {
            "name": "oklch_h",
            "type": "number",
            "description": "OKLCH hue in degrees; empty for grays, which have none."
          },
          {
            "name": "same_as",
            "type": "string",
            "description": "Other names with exactly the same value, separated by spaces; empty if none."
          }
        ],
        "primaryKey": "name",
        "missingValues": [
          ""
        ]
      }
    }
  ]
}
