public class ChipColors


Represents the background and content colors used in Chip.

See PRIMARY_COLORS for the default colors used in a primary styled . See SECONDARY_COLORS for the default colors used in a secondary styled Chip.

Summary

Public constructors

ChipColors(
    @NonNull ColorBuilders.ColorProp backgroundColor,
    @NonNull ColorBuilders.ColorProp contentColor
)

Constructor for the ChipColors object.

ChipColors(@ColorInt int backgroundColor, @ColorInt int contentColor)

Constructor for the ChipColors object.

ChipColors(
    @NonNull ColorBuilders.ColorProp backgroundColor,
    @NonNull ColorBuilders.ColorProp iconColor,
    @NonNull ColorBuilders.ColorProp contentColor,
    @NonNull ColorBuilders.ColorProp secondaryContentColor
)

Constructor for the ChipColors object.

ChipColors(
    @ColorInt int backgroundColor,
    @ColorInt int iconColor,
    @ColorInt int contentColor,
    @ColorInt int secondaryContentColor
)

Constructor for the ChipColors object.

Public methods

@NonNull ColorBuilders.ColorProp

The background color to be used on Chip.

@NonNull ColorBuilders.ColorProp

The main text color to be used on Chip.

@NonNull ColorBuilders.ColorProp

The icon color to be used on Chip.

@NonNull ColorBuilders.ColorProp

The label text color to be used on Chip.

static @NonNull ChipColors

Returns a ChipColors object, using the current Primary colors from the given .

static @NonNull ChipColors

Returns a ChipColors object, using the current Surface colors from the given .

Public constructors

ChipColors

Added in 1.0.0
public ChipColors(
    @NonNull ColorBuilders.ColorProp backgroundColor,
    @NonNull ColorBuilders.ColorProp contentColor
)

Constructor for the ChipColors object.

Parameters
@NonNull ColorBuilders.ColorProp backgroundColor

The background color to be used for Chip.

@NonNull ColorBuilders.ColorProp contentColor

The content color to be used for all items inside Chip.

ChipColors

Added in 1.0.0
public ChipColors(@ColorInt int backgroundColor, @ColorInt int contentColor)

Constructor for the ChipColors object.

Parameters
@ColorInt int backgroundColor

The background color to be used for Chip. Should be in ARGB format.

@ColorInt int contentColor

The content color to be used for all items inside Chip. Should be in ARGB format.

ChipColors

Added in 1.0.0
public ChipColors(
    @NonNull ColorBuilders.ColorProp backgroundColor,
    @NonNull ColorBuilders.ColorProp iconColor,
    @NonNull ColorBuilders.ColorProp contentColor,
    @NonNull ColorBuilders.ColorProp secondaryContentColor
)

Constructor for the ChipColors object.

Parameters
@NonNull ColorBuilders.ColorProp backgroundColor

The background color to be used for Chip.

@NonNull ColorBuilders.ColorProp iconColor

The color to be used for an icon in Chip.

@NonNull ColorBuilders.ColorProp contentColor

The text color to be used for a main text in Chip.

@NonNull ColorBuilders.ColorProp secondaryContentColor

The text color to be used for a label text in Chip.

ChipColors

Added in 1.0.0
public ChipColors(
    @ColorInt int backgroundColor,
    @ColorInt int iconColor,
    @ColorInt int contentColor,
    @ColorInt int secondaryContentColor
)

Constructor for the ChipColors object.

Parameters
@ColorInt int backgroundColor

The background color to be used for Chip. Should be in ARGB format.

@ColorInt int iconColor

The color to be used for an icon in Chip. Should be in ARGB format.

@ColorInt int contentColor

The text color to be used for a main text in Chip. Should be in ARGB format.

@ColorInt int secondaryContentColor

The text color to be used for a label text in Chip. Should be in ARGB format.

Public methods

getBackgroundColor

Added in 1.0.0
public @NonNull ColorBuilders.ColorProp getBackgroundColor()

The background color to be used on Chip.

getContentColor

Added in 1.0.0
public @NonNull ColorBuilders.ColorProp getContentColor()

The main text color to be used on Chip.

getIconColor

Added in 1.0.0
public @NonNull ColorBuilders.ColorProp getIconColor()

The icon color to be used on Chip.

getSecondaryContentColor

Added in 1.0.0
public @NonNull ColorBuilders.ColorProp getSecondaryContentColor()

The label text color to be used on Chip.

primaryChipColors

Added in 1.0.0
public static @NonNull ChipColors primaryChipColors(@NonNull Colors colors)

Returns a ChipColors object, using the current Primary colors from the given .

secondaryChipColors

Added in 1.0.0
public static @NonNull ChipColors secondaryChipColors(@NonNull Colors colors)

Returns a ChipColors object, using the current Surface colors from the given .