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.
Recommended for you
Note: link text is displayed when JavaScript is off
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-05-20 UTC.
[null,null,["Last updated 2025-05-20 UTC."],[],[],null,["# HsbFilter\n\nWatch Face Format version Version 4 Version 3 Version 2 Version 1\n\n*** ** * ** ***\n\nA filter for changing a pixel or element's hue, saturation, and brightness\n(HSB).\n\nIntroduced in Wear OS 4.\n\nSyntax\n------\n\n```xml\n\u003cHsbFilter hueRotate=\"angle-degrees\" saturate=\"normalized-float\"\n brightness=\"normalized-float\"\u003e\n\u003c/HsbFilter\u003e\n```\n\nAttributes\n----------\n\nThe `HsbFilter` element has the following attributes. Each attribute is\noptional:\n\n`hueRotate`\n\n: Represents an angle, in degrees, along the [color wheel](https://en.wikipedia.org/wiki/Color_wheel).\n An angle of `0.0` degrees corresponds to red, an angle of `120.0` degrees\n corresponds to green, and an angle of `240.0` degrees corresponds to blue.\n\n By default, this value is `0.0`.\n\n`saturate`\n\n: Represents the hue's saturation. This is a floating-point number that is in\n the range $ \\[0.0, 1.0\\] $. A saturation of `0.0` represents a shade of gray; a\n saturation of `1.0` represents the hue's full color, with no gray mixing in.\n\n By default, this value is `1.0`.\n\n`brightness`\n\n: Represents the hue's brightness. This is a floating-point number that is in\n the range $ \\[0.0, 1.0\\] $. A brightness of `0.0` represents black; a brightness\n of `1.0` represents the hue's full color, with no darkening.\n\n By default, this value is `1.0`.\n\nRecommended for you\n-------------------\n\n- Note: link text is displayed when JavaScript is off\n- [HsbFilter](/training/wearables/wff/v2/group/part/image/image-filter/hsb-filter)\n- [Slider](/develop/ui/compose/components/slider)\n- [Progress indicators](/develop/ui/compose/components/progress)"]]