1

This is a duplicate of this question. However, nobody has answered it. So, how can you change a presentation's theme via the API? Is it even possible? I'm using Java, but that shouldn't affect the API. Thanks

1 Answers1

0

You can do two things:

  1. Import a scheme from a master when creating your presentation - as suggested in the post you are refering to

  2. Change the exsiting theme with a presentations.batchUpdate UpdatePagePropertiesRequest or UpdateShapePropertiesRequest request:

    • Thereby you can specify theme colors within the update request.
    • Sample from the documentation:
{
  "requests": [
    {
      "updateShapeProperties": {
        "objectId": copyElementId,
        "fields": "shapeBackgroundFill.solidFill.color",
        "shapeProperties": {
          "shapeBackgroundFill": {
            "solidFill": {
              "color": {
                "themeColor": "LIGHT2"
              }
            }
          }
        }
      }
    }
  ]
}

References:

ziganotschka
  • 25,866
  • 2
  • 16
  • 33