HsbFilter

A filter for changing a pixel or element's hue, saturation, and brightness (HSB).

Introduced in Wear OS 4.

Syntax

<HsbFilter hueRotate="angle-degrees" saturate="normalized-float"
           brightness="normalized-float">
</HsbFilter>

Attributes

The HsbFilter element has the following attributes. Each attribute is optional:

hueRotate

Represents an angle, in degrees, along the color wheel. An angle of 0.0 degrees corresponds to red, an angle of 120.0 degrees corresponds to green, and an angle of 240.0 degrees corresponds to blue.

By default, this value is 0.0.

saturate

Represents the hue's saturation. This is a floating-point number that is in the range $ [0.0, 1.0] $. A saturation of 0.0 represents a shade of gray; a saturation of 1.0 represents the hue's full color, with no gray mixing in.

By default, this value is 1.0.

brightness

Represents the hue's brightness. This is a floating-point number that is in the range $ [0.0, 1.0] $. A brightness of 0.0 represents black; a brightness of 1.0 represents the hue's full color, with no darkening.

By default, this value is 1.0.