OPF
SpecDefinition referenceView source

Color Variant

A variant of the deck's single color scheme, as a mapping over its twelve slots (PowerPoint's clrMap): 'background' is the slot the slide background and the role bg1 take, and with it the other roles: light1 maps bg1 = light1, tx1 = dark1, bg2 = light2, tx2 = dark2; dark1 maps bg1 = dark1, tx1 = light1, bg2 = dark2, tx2 = light2; light2 and dark2 make that slot both the background and the alternate surface (light2: bg1 = bg2 = light2, tx1 = dark1, tx2 = dark2; dark2: bg1 = bg2 = dark2, tx1 = light1, tx2 = light2), which is how a slide with that theme background has always been drawn. An accent background (accent1 to accent6) is both bg1 and bg2, with the text family (light1 and light2, or dark1 and dark2) that reads better on it; see ColorVariantSlot. Text, secondary text, the card surface and every neutral (borders, gridlines, chart axis, code panel) follow the map. The PowerPoint export writes it as the master's clrMap, or a slide's clrMapOvr.

Metadata

Definition
#/$defs/ColorVariant
Form
object
Source
spec/schemas/opf.schema.json

Field index

FieldTypeReq.Description
backgroundref:ColorVariantSlotyesThe scheme slot that is the background (bg1) of the variant.
background · Allowed values
"light1""light2""dark1""dark2""accent1""accent2""accent3""accent4""accent5""accent6"
accentsarray<enum>—Optional accent order: a permutation of accent1 to accent6. Entry i is the scheme slot drawn as accent i + 1, so primary, secondary and accent (the first three) and the chart series colors follow it. Default: the scheme's own order.
accents[] · Allowed values
"accent1""accent2""accent3""accent4""accent5""accent6"

background

typeref:ColorVariantSlotrequiredyesdefault—

The scheme slot that is the background (bg1) of the variant.

background · Allowed values
"light1""light2""dark1""dark2""accent1""accent2""accent3""accent4""accent5""accent6"
background.json
{
  "background": "light1"
}

accents

typearray<enum>requirednodefault—

Optional accent order: a permutation of accent1 to accent6. Entry i is the scheme slot drawn as accent i + 1, so primary, secondary and accent (the first three) and the chart series colors follow it. Default: the scheme's own order.

accents[] · Allowed values
"accent1""accent2""accent3""accent4""accent5""accent6"
accents.json
{
  "accents": [
    "accent2",
    "accent1",
    "accent3",
    "accent4",
    "accent5",
    "accent6"
  ]
}
Complete definition constraints
Schema constraints
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "background"
  ],
  "description": "A variant of the deck's single color scheme, as a mapping over its twelve slots (PowerPoint's clrMap): 'background' is the slot the slide background and the role bg1 take, and with it the other roles: light1 maps bg1 = light1, tx1 = dark1, bg2 = light2, tx2 = dark2; dark1 maps bg1 = dark1, tx1 = light1, bg2 = dark2, tx2 = light2; light2 and dark2 make that slot both the background and the alternate surface (light2: bg1 = bg2 = light2, tx1 = dark1, tx2 = dark2; dark2: bg1 = bg2 = dark2, tx1 = light1, tx2 = light2), which is how a slide with that theme background has always been drawn. An accent background (accent1 to accent6) is both bg1 and bg2, with the text family (light1 and light2, or dark1 and dark2) that reads better on it; see ColorVariantSlot. Text, secondary text, the card surface and every neutral (borders, gridlines, chart axis, code panel) follow the map. The PowerPoint export writes it as the master's clrMap, or a slide's clrMapOvr.",
  "properties": {
    "background": {
      "$ref": "#/$defs/ColorVariantSlot",
      "description": "The scheme slot that is the background (bg1) of the variant."
    },
    "accents": {
      "type": "array",
      "minItems": 6,
      "maxItems": 6,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "accent1",
          "accent2",
          "accent3",
          "accent4",
          "accent5",
          "accent6"
        ]
      },
      "description": "Optional accent order: a permutation of accent1 to accent6. Entry i is the scheme slot drawn as accent i + 1, so primary, secondary and accent (the first three) and the chart series colors follow it. Default: the scheme's own order.",
      "examples": [
        [
          "accent2",
          "accent1",
          "accent3",
          "accent4",
          "accent5",
          "accent6"
        ]
      ]
    }
  },
  "examples": [
    {
      "background": "dark1"
    },
    {
      "background": "light2",
      "accents": [
        "accent2",
        "accent1",
        "accent3",
        "accent4",
        "accent5",
        "accent6"
      ]
    }
  ]
}