{
  "schemaUnderTest": "https://huecodex.com/json/hue-codex-export.schema.json",
  "schemasUnderTest": [
    "https://huecodex.com/json/hue-codex-export.schema.json",
    "https://huecodex.com/json/hue-codex-plain-report.schema.json",
    "https://huecodex.com/json/hue-codex-portable-color.schema.json",
    "https://huecodex.com/json/hue-codex-token-style.schema.json"
  ],
  "description": "Small Hue Codex export fixtures for validating the downloadable export JSON Schemas and common handoff shapes.",
  "lastUpdated": "2026-07-07",
  "cases": [
    {
      "name": "portable-single-color-record",
      "valid": true,
      "data": {
        "name": "primary",
        "value": "#0EA5E9",
        "type": "color",
        "space": "srgb",
        "contrast": {
          "againstWhite": 2.77,
          "againstWhiteRaw": 2.771412229141218,
          "againstBlack": 7.58,
          "againstBlackRaw": 7.577364269085043
        },
        "source": "palette-generator",
        "caveats": []
      }
    },
    {
      "name": "token-style-color-container",
      "valid": true,
      "data": {
        "$schema": "https://huecodex.com/json/hue-codex-token-style.schema.json",
        "$extensions": {
          "hueCodex": {
            "source": "validation-fixture",
            "format": "hue-codex-token-style",
            "dtcgConformance": false
          }
        },
        "color": {
          "primary": {
            "$type": "color",
            "$value": "#0EA5E9",
            "$description": "Primary color fixture."
          },
          "primary-foreground": {
            "$type": "color",
            "$value": "#000000",
            "$description": "Readable foreground for the primary color fixture."
          }
        }
      }
    },
    {
      "name": "reference-record-array",
      "valid": true,
      "data": [
        {
          "term": "OKLCH",
          "category": "Color models",
          "aliases": ["Oklch"],
          "definition": "A cylindrical form of OKLab used for perceptual lightness, chroma, and hue work.",
          "lastReviewed": "2026-07-06"
        },
        {
          "term": "WCAG contrast ratio",
          "category": "Accessibility",
          "aliases": ["contrast"],
          "definition": "A relative-luminance ratio used by WCAG contrast checks.",
          "lastReviewed": "2026-07-06"
        }
      ]
    },
    {
      "name": "plain-report-with-scalar-color-field",
      "valid": true,
      "data": {
        "tool": "contrast-checker",
        "color": "#0EA5E9",
        "ratio": 2.77,
        "note": "A scalar color field is a plain report field, not a token-style color group."
      }
    },
    {
      "name": "malformed-token-style-missing-value",
      "valid": false,
      "data": {
        "color": {
          "primary": {
            "$type": "color",
            "$description": "Missing $value must not pass by falling through to plainReportObject."
          }
        }
      }
    },
    {
      "name": "malformed-token-style-schema-only",
      "valid": false,
      "data": {
        "$schema": "https://huecodex.com/json/hue-codex-token-style.schema.json"
      }
    },
    {
      "name": "invalid-non-json-export-root",
      "valid": false,
      "data": "not a Hue Codex JSON export"
    }
  ]
}
