OPF
SpecDefinition referenceView source

Background

Background fill applied to slides. Theme backgrounds preserve PowerPoint's color-scheme background choice; other variants represent fixed background fills.

Metadata

Definition
#/$defs/Background
Form
5 alternative forms (oneOf)
Source
spec/schemas/opf.schema.json

Field index

This definition uses the forms or value constraints below.

oneOf 1 · ref:ThemeBackground

Referenced ThemeBackground · object

Theme-controlled PowerPoint slide background. The slot is resolved through the active color scheme and remains theme-aware.

FieldTypeReq.DefaultDescription
typeconstyes—Theme-controlled background fill.
type · Allowed values
"theme"
slotref:ThemeBackgroundSlotyes—
slot · Allowed values
"light1""light2""dark1""dark2"

type

typeconstrequiredyesdefault—

Theme-controlled background fill.

type · Allowed values
"theme"
type.json
{
  "type": "theme"
}

slot

typeref:ThemeBackgroundSlotrequiredyesdefault—

slot · Allowed values
"light1""light2""dark1""dark2"
slot.json
{
  "slot": "light1"
}
Exact constraints for Referenced ThemeBackground
Referenced ThemeBackground schema
{
  "type": "object",
  "description": "Theme-controlled PowerPoint slide background. The slot is resolved through the active color scheme and remains theme-aware.",
  "required": [
    "type",
    "slot"
  ],
  "properties": {
    "type": {
      "type": "string",
      "const": "theme",
      "description": "Theme-controlled background fill."
    },
    "slot": {
      "$ref": "#/$defs/ThemeBackgroundSlot"
    }
  }
}
Exact constraints for oneOf 1
oneOf 1 schema
{
  "$ref": "#/$defs/ThemeBackground"
}

oneOf 2 · ref:SolidBackground

Referenced SolidBackground · object

Fixed solid slide background fill.

FieldTypeReq.DefaultDescription
typeconstyes—Fixed solid background fill.
type · Allowed values
"solid"
colorref:ColorRefyes—Fixed solid fill color: a hex string, a color-scheme slot or role name, or a var:<id> variable reference (a ColorRef, resolved against the effective color scheme and the deck variables). Use { type: 'theme', slot: ... } for PowerPoint's four theme-controlled background choices.
color · Named choices (see schema for other values and constraints)
"accent1""accent2""accent3""accent4""accent5""accent6""dark1""dark2""light1""light2""hyperlink""followedHyperlink""primary""secondary""accent""background""surface""surfaceAlt""text""textSecondary"
opacitynumber——Background opacity from 0 (fully transparent) to 1 (fully opaque).

type

typeconstrequiredyesdefault—

Fixed solid background fill.

type · Allowed values
"solid"
type.json
{
  "type": "solid"
}

color

typeref:ColorRefrequiredyesdefault—

Fixed solid fill color: a hex string, a color-scheme slot or role name, or a var:<id> variable reference (a ColorRef, resolved against the effective color scheme and the deck variables). Use { type: 'theme', slot: ... } for PowerPoint's four theme-controlled background choices.

color · Named choices (see schema for other values and constraints)
"accent1""accent2""accent3""accent4""accent5""accent6""dark1""dark2""light1""light2""hyperlink""followedHyperlink""primary""secondary""accent""background""surface""surfaceAlt""text""textSecondary"
color.json
{
  "color": "#FFFFFF"
}

opacity

typenumberrequirednodefault—

Background opacity from 0 (fully transparent) to 1 (fully opaque).

Exact constraints for Referenced SolidBackground
Referenced SolidBackground schema
{
  "type": "object",
  "description": "Fixed solid slide background fill.",
  "required": [
    "type",
    "color"
  ],
  "properties": {
    "type": {
      "type": "string",
      "const": "solid",
      "description": "Fixed solid background fill."
    },
    "color": {
      "$ref": "#/$defs/ColorRef",
      "description": "Fixed solid fill color: a hex string, a color-scheme slot or role name, or a var:<id> variable reference (a ColorRef, resolved against the effective color scheme and the deck variables). Use { type: 'theme', slot: ... } for PowerPoint's four theme-controlled background choices.",
      "examples": [
        "#FFFFFF",
        "#0F172A",
        "#F8FAFC"
      ]
    },
    "opacity": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "description": "Background opacity from 0 (fully transparent) to 1 (fully opaque)."
    }
  }
}
Exact constraints for oneOf 2
oneOf 2 schema
{
  "$ref": "#/$defs/SolidBackground"
}

oneOf 3 · ref:GradientBackground

Referenced GradientBackground · object

Fixed gradient slide background fill.

FieldTypeReq.DefaultDescription
toneenum——Whether the background is dark or light, which picks the color map (dark1 or light1) so text, lines and neutrals read on it. Without a tone a picture or gradient takes the deck's variant, else counts as light.
tone · Allowed values
"dark""light"
typeconstyes—Fixed gradient background fill.
type · Allowed values
"gradient"
gradientobjectyes—Gradient fill definition.
opacitynumber——Background opacity from 0 (fully transparent) to 1 (fully opaque).

tone

typeenumrequirednodefault—

Whether the background is dark or light, which picks the color map (dark1 or light1) so text, lines and neutrals read on it. Without a tone a picture or gradient takes the deck's variant, else counts as light.

tone · Allowed values
"dark""light"
tone.json
{
  "tone": "dark"
}

type

typeconstrequiredyesdefault—

Fixed gradient background fill.

type · Allowed values
"gradient"
type.json
{
  "type": "gradient"
}

gradient

typeobjectrequiredyesdefault—

Gradient fill definition.

gradient.stops[].color · Named choices (see schema for other values and constraints)
"accent1""accent2""accent3""accent4""accent5""accent6""dark1""dark2""light1""light2""hyperlink""followedHyperlink""primary""secondary""accent""background""surface""surfaceAlt""text""textSecondary"

opacity

typenumberrequirednodefault—

Background opacity from 0 (fully transparent) to 1 (fully opaque).

Exact constraints for Referenced GradientBackground
Referenced GradientBackground schema
{
  "type": "object",
  "description": "Fixed gradient slide background fill.",
  "required": [
    "type",
    "gradient"
  ],
  "properties": {
    "tone": {
      "type": "string",
      "enum": [
        "dark",
        "light"
      ],
      "description": "Whether the background is dark or light, which picks the color map (dark1 or light1) so text, lines and neutrals read on it. Without a tone a picture or gradient takes the deck's variant, else counts as light."
    },
    "type": {
      "type": "string",
      "const": "gradient",
      "description": "Fixed gradient background fill."
    },
    "gradient": {
      "type": "object",
      "description": "Gradient fill definition.",
      "properties": {
        "angle": {
          "type": "number",
          "description": "Gradient angle in degrees (0 = left-to-right, 90 = top-to-bottom)."
        },
        "stops": {
          "type": "array",
          "minItems": 2,
          "description": "Ordered list of color stops along the gradient. A gradient needs at least two stops.",
          "items": {
            "type": "object",
            "description": "Color stop along the gradient.",
            "required": [
              "color",
              "position"
            ],
            "properties": {
              "color": {
                "$ref": "#/$defs/ColorRef",
                "description": "Stop color: a hex string, a color-scheme slot or role name, or a var:<id> variable reference (a ColorRef).",
                "examples": [
                  "#1E40AF",
                  "#22D3EE"
                ]
              },
              "position": {
                "type": "number",
                "minimum": 0,
                "maximum": 1,
                "description": "Stop position along the gradient, from 0 (start) to 1 (end)."
              }
            }
          }
        }
      }
    },
    "opacity": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "description": "Background opacity from 0 (fully transparent) to 1 (fully opaque)."
    }
  }
}
Exact constraints for oneOf 3
oneOf 3 schema
{
  "$ref": "#/$defs/GradientBackground"
}

oneOf 4 · ref:ImageBackground

Referenced ImageBackground · object

Picture background: the image fills the whole canvas behind everything and never moves content (to push content aside, use an image block with placement). The string shorthand 'asset:x' (or any image source) is { type: 'image', src: 'asset:x' }, a cover image. Paint order: the colour scheme's default slide background, the picture, then the overlay, then furniture and content.

FieldTypeReq.DefaultDescription
toneenum——Whether the background is dark or light, which picks the color map (dark1 or light1) so text, lines and neutrals read on it. Without a tone a picture or gradient takes the deck's variant, else counts as light.
tone · Allowed values
"dark""light"
typeconstyes—Picture background.
type · Allowed values
"image"
srcstringyes—Source for the background image: an 'asset:<id>' reference, HTTPS URL, data URI, or a relative path resolved against the OPF file location.
altstring——Alternative text. A background with alt is meaningful: PowerPoint export draws it as a full-slide picture at the back that carries the text, so screen readers see it. Without alt it is decorative and exports as the native slide background; the alt text of a referenced asset does not count, so a background is decorative unless it says otherwise.
fitenum——How the picture fills the canvas: 'cover' fills it and crops what overflows around focus; 'contain' shows the whole picture centered over the colour scheme's default background; 'stretch' scales it to the canvas exactly; 'tile' repeats it at its own size from the top-left corner. Default 'cover'.
fit · Allowed values
"cover""contain""stretch""tile"
focusref:ImageFocus——Point of the picture to keep in view when 'cover' crops it. Ignored by the other fits.
opacitynumber——Picture opacity from 0 (fully transparent) to 1 (fully opaque); the overlay keeps its own opacity. Default 1.
recolorref:ImageRecolor——Grayscale or duotone treatment of the picture's pixels, as on an image block: recolor and opacity apply to the pixels, then the overlay is drawn above.
recolor · Named choices (see schema for other values and constraints)
"grayscale"
overlayref:Overlay——Scrim over the whole picture or a band along one edge (edge, size), beneath furniture and content, for example to keep a title readable over a busy photo.

tone

typeenumrequirednodefault—

Whether the background is dark or light, which picks the color map (dark1 or light1) so text, lines and neutrals read on it. Without a tone a picture or gradient takes the deck's variant, else counts as light.

tone · Allowed values
"dark""light"
tone.json
{
  "tone": "dark"
}

type

typeconstrequiredyesdefault—

Picture background.

type · Allowed values
"image"
type.json
{
  "type": "image"
}

src

typestringrequiredyesdefault—

Source for the background image: an 'asset:<id>' reference, HTTPS URL, data URI, or a relative path resolved against the OPF file location.

src.json
{
  "src": "https://cdn.acme.com/backgrounds/cover.jpg"
}

alt

typestringrequirednodefault—

Alternative text. A background with alt is meaningful: PowerPoint export draws it as a full-slide picture at the back that carries the text, so screen readers see it. Without alt it is decorative and exports as the native slide background; the alt text of a referenced asset does not count, so a background is decorative unless it says otherwise.

fit

typeenumrequirednodefault—

How the picture fills the canvas: 'cover' fills it and crops what overflows around focus; 'contain' shows the whole picture centered over the colour scheme's default background; 'stretch' scales it to the canvas exactly; 'tile' repeats it at its own size from the top-left corner. Default 'cover'.

fit · Allowed values
"cover""contain""stretch""tile"
fit.json
{
  "fit": "cover"
}

focus

typeref:ImageFocusrequirednodefault—

Point of the picture to keep in view when 'cover' crops it. Ignored by the other fits.

opacity

typenumberrequirednodefault—

Picture opacity from 0 (fully transparent) to 1 (fully opaque); the overlay keeps its own opacity. Default 1.

recolor

typeref:ImageRecolorrequirednodefault—

Grayscale or duotone treatment of the picture's pixels, as on an image block: recolor and opacity apply to the pixels, then the overlay is drawn above.

recolor · Named choices (see schema for other values and constraints)
"grayscale"
recolor (oneOf 2).dark · Named choices (see schema for other values and constraints)
"accent1", "accent2", "accent3", "accent4", "accent5", "accent6", "dark1", "dark2", "light1", "light2", "hyperlink", "followedHyperlink", "primary", "secondary", "accent", "background", "surface", "surfaceAlt", "text", "textSecondary"
recolor (oneOf 2).light · Named choices (see schema for other values and constraints)
"accent1", "accent2", "accent3", "accent4", "accent5", "accent6", "dark1", "dark2", "light1", "light2", "hyperlink", "followedHyperlink", "primary", "secondary", "accent", "background", "surface", "surfaceAlt", "text", "textSecondary"

overlay

typeref:Overlayrequirednodefault—

Scrim over the whole picture or a band along one edge (edge, size), beneath furniture and content, for example to keep a title readable over a busy photo.

overlay.color · Named choices (see schema for other values and constraints)
"accent1""accent2""accent3""accent4""accent5""accent6""dark1""dark2""light1""light2""hyperlink""followedHyperlink""primary""secondary""accent""background""surface""surfaceAlt""text""textSecondary"
overlay.edge · Allowed values
"top""bottom""left""right"
Exact constraints for Referenced ImageBackground
Referenced ImageBackground schema
{
  "type": "object",
  "additionalProperties": false,
  "description": "Picture background: the image fills the whole canvas behind everything and never moves content (to push content aside, use an image block with placement). The string shorthand 'asset:x' (or any image source) is { type: 'image', src: 'asset:x' }, a cover image. Paint order: the colour scheme's default slide background, the picture, then the overlay, then furniture and content.",
  "required": [
    "type",
    "src"
  ],
  "properties": {
    "tone": {
      "type": "string",
      "enum": [
        "dark",
        "light"
      ],
      "description": "Whether the background is dark or light, which picks the color map (dark1 or light1) so text, lines and neutrals read on it. Without a tone a picture or gradient takes the deck's variant, else counts as light."
    },
    "type": {
      "type": "string",
      "const": "image",
      "description": "Picture background."
    },
    "src": {
      "type": "string",
      "description": "Source for the background image: an 'asset:<id>' reference, HTTPS URL, data URI, or a relative path resolved against the OPF file location.",
      "examples": [
        "https://cdn.acme.com/backgrounds/cover.jpg",
        "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAA...",
        "./backgrounds/cover.jpg",
        "asset:bg-cover"
      ]
    },
    "alt": {
      "type": "string",
      "description": "Alternative text. A background with alt is meaningful: PowerPoint export draws it as a full-slide picture at the back that carries the text, so screen readers see it. Without alt it is decorative and exports as the native slide background; the alt text of a referenced asset does not count, so a background is decorative unless it says otherwise."
    },
    "fit": {
      "type": "string",
      "enum": [
        "cover",
        "contain",
        "stretch",
        "tile"
      ],
      "description": "How the picture fills the canvas: 'cover' fills it and crops what overflows around focus; 'contain' shows the whole picture centered over the colour scheme's default background; 'stretch' scales it to the canvas exactly; 'tile' repeats it at its own size from the top-left corner. Default 'cover'."
    },
    "focus": {
      "$ref": "#/$defs/ImageFocus",
      "description": "Point of the picture to keep in view when 'cover' crops it. Ignored by the other fits."
    },
    "opacity": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "description": "Picture opacity from 0 (fully transparent) to 1 (fully opaque); the overlay keeps its own opacity. Default 1."
    },
    "recolor": {
      "$ref": "#/$defs/ImageRecolor",
      "description": "Grayscale or duotone treatment of the picture's pixels, as on an image block: recolor and opacity apply to the pixels, then the overlay is drawn above."
    },
    "overlay": {
      "$ref": "#/$defs/Overlay",
      "description": "Scrim over the whole picture or a band along one edge (edge, size), beneath furniture and content, for example to keep a title readable over a busy photo."
    }
  },
  "examples": [
    {
      "type": "image",
      "src": "asset:cover-photo"
    },
    {
      "type": "image",
      "src": "./images/harbour.jpg",
      "alt": "Container ships at dawn",
      "focus": {
        "x": 0.5,
        "y": 0.7
      },
      "overlay": {
        "color": "dark1",
        "opacity": 0.4
      }
    }
  ]
}
Exact constraints for oneOf 4
oneOf 4 schema
{
  "$ref": "#/$defs/ImageBackground"
}

oneOf 5 · ref:PatternBackground

Referenced PatternBackground · object

Fixed pattern slide background fill.

FieldTypeReq.DefaultDescription
typeconstyes—Fixed pattern background fill.
type · Allowed values
"pattern"
patternobjectyes—Pattern fill definition.
opacitynumber——Background opacity from 0 (fully transparent) to 1 (fully opaque).

type

typeconstrequiredyesdefault—

Fixed pattern background fill.

type · Allowed values
"pattern"
type.json
{
  "type": "pattern"
}

pattern

typeobjectrequiredyesdefault—

Pattern fill definition.

pattern.foregroundColor · Named choices (see schema for other values and constraints)
"accent1", "accent2", "accent3", "accent4", "accent5", "accent6", "dark1", "dark2", "light1", "light2", "hyperlink", "followedHyperlink", "primary", "secondary", "accent", "background", "surface", "surfaceAlt", "text", "textSecondary"
pattern.backgroundColor · Named choices (see schema for other values and constraints)
"accent1", "accent2", "accent3", "accent4", "accent5", "accent6", "dark1", "dark2", "light1", "light2", "hyperlink", "followedHyperlink", "primary", "secondary", "accent", "background", "surface", "surfaceAlt", "text", "textSecondary"

opacity

typenumberrequirednodefault—

Background opacity from 0 (fully transparent) to 1 (fully opaque).

Exact constraints for Referenced PatternBackground
Referenced PatternBackground schema
{
  "type": "object",
  "description": "Fixed pattern slide background fill.",
  "required": [
    "type",
    "pattern"
  ],
  "properties": {
    "type": {
      "type": "string",
      "const": "pattern",
      "description": "Fixed pattern background fill."
    },
    "pattern": {
      "type": "object",
      "description": "Pattern fill definition.",
      "required": [
        "preset"
      ],
      "properties": {
        "preset": {
          "type": "string",
          "description": "Pattern preset or engine-defined pattern id. DrawingML preset names (ECMA-376 ST_PresetPatternVal, for example pct5, ltHorz, wdUpDiag) are portable: PPTX export writes them as native pattern fills and import returns the same name. Engine-defined ids are renderer-specific; the legacy preview id diagStripe remains accepted and exports as wdUpDiag.",
          "examples": [
            "pct5",
            "ltHorz",
            "wdUpDiag"
          ]
        },
        "foregroundColor": {
          "$ref": "#/$defs/ColorRef",
          "description": "Foreground color for the pattern: a hex string, a color-scheme slot or role name, or a var:<id> variable reference (a ColorRef).",
          "examples": [
            "#0F172A"
          ]
        },
        "backgroundColor": {
          "$ref": "#/$defs/ColorRef",
          "description": "Background color behind the pattern: a hex string, a color-scheme slot or role name, or a var:<id> variable reference (a ColorRef).",
          "examples": [
            "#FFFFFF"
          ]
        }
      }
    },
    "opacity": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "description": "Background opacity from 0 (fully transparent) to 1 (fully opaque)."
    }
  }
}
Exact constraints for oneOf 5
oneOf 5 schema
{
  "$ref": "#/$defs/PatternBackground"
}
Complete definition constraints
Schema constraints
{
  "description": "Background fill applied to slides. Theme backgrounds preserve PowerPoint's color-scheme background choice; other variants represent fixed background fills.",
  "oneOf": [
    {
      "$ref": "#/$defs/ThemeBackground"
    },
    {
      "$ref": "#/$defs/SolidBackground"
    },
    {
      "$ref": "#/$defs/GradientBackground"
    },
    {
      "$ref": "#/$defs/ImageBackground"
    },
    {
      "$ref": "#/$defs/PatternBackground"
    }
  ]
}