OPF

Search docs

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

    Shadow

    Outer shadow (a:outerShdw): a preset name (soft, hard, perspective) or { color, opacity, blur, distance, angle, size }.

    Metadata

    Definition
    #/$defs/Shadow
    Form
    2 inclusive forms (anyOf)
    Source
    spec/schemas/opf.schema.json

    Field index

    This definition uses the forms or value constraints below.

    anyOf 1 · enum

    A preset outer shadow.

    Exact constraints for anyOf 1
    anyOf 1 schema
    {
      "type": "string",
      "enum": [
        "soft",
        "hard",
        "perspective"
      ],
      "description": "A preset outer shadow."
    }

    anyOf 2 · object

    FieldTypeReq.DefaultDescription
    colorref:ColorRef——Shadow color. Default black.
    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——Shadow opacity.
    blurnumber——Blur radius in reference pixels at a 720-pixel short edge.
    distancenumber——Offset from the shape in reference pixels at a 720-pixel short edge.
    anglenumber——Direction of the offset in degrees (0 = right, 90 = down).
    sizenumber——Shadow size relative to the shape (1 = the shape's own size).

    color

    typeref:ColorRefrequirednodefault—

    Shadow color. Default black.

    Named choices are not exhaustive. See the schema for other values and constraints.
    color, color (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"

    opacity

    typenumberrequirednodefault—

    Shadow opacity.

    blur

    typenumberrequirednodefault—

    Blur radius in reference pixels at a 720-pixel short edge.

    distance

    typenumberrequirednodefault—

    Offset from the shape in reference pixels at a 720-pixel short edge.

    angle

    typenumberrequirednodefault—

    Direction of the offset in degrees (0 = right, 90 = down).

    size

    typenumberrequirednodefault—

    Shadow size relative to the shape (1 = the shape's own size).

    Exact constraints for anyOf 2
    anyOf 2 schema
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "color": {
          "$ref": "#/$defs/ColorRef",
          "description": "Shadow color. Default black."
        },
        "opacity": {
          "type": "number",
          "minimum": 0,
          "maximum": 1,
          "description": "Shadow opacity."
        },
        "blur": {
          "type": "number",
          "minimum": 0,
          "maximum": 200,
          "description": "Blur radius in reference pixels at a 720-pixel short edge."
        },
        "distance": {
          "type": "number",
          "minimum": 0,
          "maximum": 200,
          "description": "Offset from the shape in reference pixels at a 720-pixel short edge."
        },
        "angle": {
          "type": "number",
          "minimum": 0,
          "maximum": 360,
          "description": "Direction of the offset in degrees (0 = right, 90 = down)."
        },
        "size": {
          "type": "number",
          "minimum": 0.1,
          "maximum": 2,
          "description": "Shadow size relative to the shape (1 = the shape's own size)."
        }
      }
    }
    Complete definition constraints
    Schema constraints
    {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "soft",
            "hard",
            "perspective"
          ],
          "description": "A preset outer shadow."
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "color": {
              "$ref": "#/$defs/ColorRef",
              "description": "Shadow color. Default black."
            },
            "opacity": {
              "type": "number",
              "minimum": 0,
              "maximum": 1,
              "description": "Shadow opacity."
            },
            "blur": {
              "type": "number",
              "minimum": 0,
              "maximum": 200,
              "description": "Blur radius in reference pixels at a 720-pixel short edge."
            },
            "distance": {
              "type": "number",
              "minimum": 0,
              "maximum": 200,
              "description": "Offset from the shape in reference pixels at a 720-pixel short edge."
            },
            "angle": {
              "type": "number",
              "minimum": 0,
              "maximum": 360,
              "description": "Direction of the offset in degrees (0 = right, 90 = down)."
            },
            "size": {
              "type": "number",
              "minimum": 0.1,
              "maximum": 2,
              "description": "Shadow size relative to the shape (1 = the shape's own size)."
            }
          }
        }
      ],
      "description": "Outer shadow (a:outerShdw): a preset name (soft, hard, perspective) or { color, opacity, blur, distance, angle, size }."
    }
    value · Named choices (see schema for other values and constraints)
    "soft""hard""perspective"