ColorBuilders.ColorStop


@RequiresSchemaVersion(major = 1, minor = 300)
public final class ColorBuilders.ColorStop


A color and an offset, determining a color position in a gradient.

Summary

Nested types

Builder for ColorStop

Public methods

@NonNull ColorBuilders.ColorProp

Gets the color for this stop.

@Nullable TypeBuilders.FloatProp

Gets the relative offset for this color, between 0 and 1.

@NonNull String

Public methods

getColor

Added in 1.1.0
public @NonNull ColorBuilders.ColorProp getColor()

Gets the color for this stop. Only opaque colors are supported. Any transparent colors will have their alpha component set to 0xFF (opaque).

getOffset

Added in 1.1.0
public @Nullable TypeBuilders.FloatProp getOffset()

Gets the relative offset for this color, between 0 and 1. This determines where the color is positioned relative to a gradient space.

toString

public @NonNull String toString()