Skip to content

ShowBackground

Sets the background image or color

Parameters

NameTypeOptionalDescription
backgroundstring | Record<string, string>Background

Usage

ts
engine.script({
  start: [
    engine.action.showBackground("#f67288"),
    engine.action.showBackground("<url>"),
    // latest matching is preferred
    engine.action.showBackground({
      all: "<url>",
      portrait: "<url>",
      "(prefers-color-scheme: dark)": "#363636",
    }),
  ],
});

Released under the ISC License.