trait ThemeEffectTrait

Trait ThemeEffectTrait

Methods

theme(string $color, integer $photoSensitivity = null)

Changes the main background color to the one specified, as if a 'theme change' was applied (e.g. dark mode vs light mode).

Details

static ThemeEffect theme(string $color, integer $photoSensitivity = null)

Changes the main background color to the one specified, as if a 'theme change' was applied (e.g. dark mode vs light mode).

Parameters

Name Type Description
$color string The target background color. Specify either the name of a color (e.g. black, lightgray), or an RGB hex value (e.g. f0ebe6).
$photoSensitivity integer The sensitivity to photographic elements of an image. A value of 0 treats the whole image as non-photographic. A value of 200 treats the whole image as photographic, so no theme change is applied. Range: 0 to 200. Default: 100.

Return Value

ThemeEffect

See also

ThemeEffect
ThemeQualifier