OPF

Search docs

Loading documentation…
    OpenPresentation/opf
    Browse docs
    On this page
    View source

    Pattern

    A two-color pattern fill (the background pattern object), DrawingML a:pattFill.

    Metadata

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

    Field index

    FieldTypeReq.Description
    presetstringyesDrawingML pattern preset (ECMA-376 ST_PresetPatternVal), for example pct5, ltHorz, wdUpDiag, smGrid or dotDmnd.
    foregroundColorref:ColorRef—Pattern color. Default the shape style's fill color.
    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"
    backgroundColorref:ColorRef—Color behind the pattern. Default the slide background.
    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"

    preset

    typestringrequiredyesdefault—

    DrawingML pattern preset (ECMA-376 ST_PresetPatternVal), for example pct5, ltHorz, wdUpDiag, smGrid or dotDmnd.

    preset.json
    {
      "preset": "pct20"
    }

    foregroundColor

    typeref:ColorRefrequirednodefault—

    Pattern color. Default the shape style's fill color.

    Named choices are not exhaustive. See the schema for other values and constraints.
    foregroundColor, foregroundColor (anyOf 4).color · Named choices
    "accent1", "accent2", "accent3", "accent4", "accent5", "accent6", "dark1", "dark2", "light1", "light2", "hyperlink", "followedHyperlink", "primary", "secondary", "accent", "background", "surface", "surfaceAlt", "text", "textSecondary"

    backgroundColor

    typeref:ColorRefrequirednodefault—

    Color behind the pattern. Default the slide background.

    Allowed values and named choices: as for foregroundColor, under this field’s own path.

    Complete definition constraints
    Schema constraints
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "preset"
      ],
      "description": "A two-color pattern fill (the background pattern object), DrawingML a:pattFill.",
      "properties": {
        "preset": {
          "type": "string",
          "description": "DrawingML pattern preset (ECMA-376 ST_PresetPatternVal), for example pct5, ltHorz, wdUpDiag, smGrid or dotDmnd.",
          "examples": [
            "pct20",
            "ltUpDiag",
            "smGrid"
          ]
        },
        "foregroundColor": {
          "$ref": "#/$defs/ColorRef",
          "description": "Pattern color. Default the shape style's fill color."
        },
        "backgroundColor": {
          "$ref": "#/$defs/ColorRef",
          "description": "Color behind the pattern. Default the slide background."
        }
      }
    }