ColorRamp
class ColorRamp
Describes an optional color ramp for the progress bar associated with RangedValueComplicationData or GoalProgressComplicationData. This is a rendering hint that overrides the normal watch face colors when there's a particular semantic meaning. E.g. red to blue for a ranged value representing temperature.
Note this is a subset of the functionality of android.graphics.LinearGradient and the x & y coordinates for the ramp are not known to the complication data source.
Summary
Public properties |
|
|---|---|
IntArray |
The colors to render the progress bar with. |
Boolean |
If |
Public constructors
Public functions
Public properties
colors
val colors: IntArray
The colors to render the progress bar with. For RangedValueComplicationData the first color corresponds to RangedValueComplicationData.min and the last color to RangedValueComplicationData.max. For GoalProgressComplicationData the first color corresponds to zero and the last color to GoalProgressComplicationData.targetValue. A maximum of 7 colors may be specified. When rendered the colors must be evenly spread along the progress bar. The colors must be meaningful to the user, e.g. blue = cold, red/yellow = warm.
interpolated
val interpolated: Boolean
If true then the colors should be smoothly interpolated when rendering the progress bar. If false the colors should be rendered as equal sized regions of solid color, resulting in a noticeable step between each color.