{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rendry-io/json-schema/rendry-io-photo-palette-schema.json",
  "title": "PhotoPalette",
  "description": "Dominant colours of a photo and the roles suggested for a layout around it.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rendry-io-images-api-openapi.yml#/components/schemas/PhotoPalette",
  "type": "object",
  "properties": {
    "colors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "hex": {
            "type": "string"
          },
          "share": {
            "type": "number",
            "description": "Fraction of the measured pixels"
          }
        }
      }
    },
    "suggestion": {
      "type": "object",
      "properties": {
        "background": {
          "type": "string"
        },
        "support": {
          "type": "string"
        },
        "accent": {
          "type": "string"
        }
      }
    },
    "measured_over": {
      "type": "string",
      "description": "What was measured: the whole photo, or the frame passed"
    },
    "roles": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "bg, support, accent, on and the ranked colours 0..5 — the names a derived colour is addressed by"
    },
    "hint": {
      "type": "string"
    }
  }
}