OPF
SpecDefinition referenceView source

Pattern Background

Fixed pattern slide background fill.

Metadata

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

Field index

FieldTypeReq.Description
typeconstyesFixed pattern background fill.
type · Allowed values
"pattern"
patternobjectyesPattern 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).

Complete definition constraints
Schema constraints
{
  "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)."
    }
  }
}