Bricks Schema 中文文档:Bricks 调色板

标签TAGS: 

📄 原始资料  |  展开查看原始 JSON(color-palettes.json){ “$schema”: “https://json-schema.org/draft/2020-12/schema”, “$id”: “bricks://global/color-palettes”, “schemaVersion”: “2.3”, “title”: “Bricks Color Palettes”, “type”: “array”, “items”: { “type”: “object”, “properties”: { “id”: { “type”: “string” …

📄 原始资料  |  展开查看原始 JSON(color-palettes.json)
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "bricks://global/color-palettes",
  "schemaVersion": "2.3",
  "title": "Bricks Color Palettes",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      },
      "name": {
        "type": "string"
      },
      "colors": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "raw": {
              "type": "string"
            },
            "light": {
              "type": "string"
            },
            "dark": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "raw",
            "light"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "id",
      "name",
      "colors"
    ],
    "additionalProperties": false
  },
  "titleZh": "Bricks 调色板"
}

基本信息

  • 英文名称Bricks Color Palettes
  • 中文名称:Bricks 调色板
  • Schema IDbricks://global/color-palettes
  • Schema 版本2.3
  • 类型array

条目属性

  • id (string)
  • name (string)
  • colors (array)

Schema 定义

完整 JSON 定义

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "bricks://global/color-palettes",
  "schemaVersion": "2.3",
  "title": "Bricks Color Palettes",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      },
      "name": {
        "type": "string"
      },
      "colors": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "raw": {
              "type": "string"
            },
            "light": {
              "type": "string"
            },
            "dark": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "raw",
            "light"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "id",
      "name",
      "colors"
    ],
    "additionalProperties": false
  },
  "titleZh": "Bricks 调色板"
}

补充说明

更多细节可参考 Bricks 官方 Academy 文档