public final class Colors


A set of named color parameters for a GlimmerTheme.

Summary

Public constructors

Colors(
    @NonNull Color primary,
    @NonNull Color secondary,
    @NonNull Color positive,
    @NonNull Color negative,
    @NonNull Color surface,
    @NonNull Color outline,
    @NonNull Color outlineVariant
)

Public methods

final @NonNull Colors
copy(
    @NonNull Color primary,
    @NonNull Color secondary,
    @NonNull Color positive,
    @NonNull Color negative,
    @NonNull Color surface,
    @NonNull Color outline,
    @NonNull Color outlineVariant
)

Returns a copy of this Colors, optionally overriding some of the values.

boolean
equals(Object other)
final @NonNull Color

The negative color is used to indicate negative actions.

final @NonNull Color

Subtle color used for borders.

final @NonNull Color

Utility color used for borders for decorative elements when strong contrast is not required.

final @NonNull Color

The positive color is used to indicate positive or affirmative actions.

final @NonNull Color

The primary color is an accent color used for brand expression.

final @NonNull Color

The secondary color is an accent color used for brand expression.

final @NonNull Color

The surface color that affect surfaces of components, such as buttons, cards, and list items.

int
@NonNull String

Public constructors

Colors

Added in 1.0.0-alpha01
public Colors(
    @NonNull Color primary,
    @NonNull Color secondary,
    @NonNull Color positive,
    @NonNull Color negative,
    @NonNull Color surface,
    @NonNull Color outline,
    @NonNull Color outlineVariant
)

Public methods

copy

Added in 1.0.0-alpha01
public final @NonNull Colors copy(
    @NonNull Color primary,
    @NonNull Color secondary,
    @NonNull Color positive,
    @NonNull Color negative,
    @NonNull Color surface,
    @NonNull Color outline,
    @NonNull Color outlineVariant
)

Returns a copy of this Colors, optionally overriding some of the values.

equals

public boolean equals(Object other)

getNegative

public final @NonNull Color getNegative()

The negative color is used to indicate negative actions. For example, the border of a cancel button. It should not be used to fill surfaces.

getOutline

public final @NonNull Color getOutline()

Subtle color used for borders. This color helps to add contrast around components for accessibility purposes.

getOutlineVariant

public final @NonNull Color getOutlineVariant()

Utility color used for borders for decorative elements when strong contrast is not required.

getPositive

public final @NonNull Color getPositive()

The positive color is used to indicate positive or affirmative actions. For example, the border of a confirmation button. It should not be used to fill surfaces.

getPrimary

public final @NonNull Color getPrimary()

The primary color is an accent color used for brand expression. It should typically be used with text and icons for emphasis, or with borders to accentuate a particular component - it should not be used to fill surfaces.

getSecondary

public final @NonNull Color getSecondary()

The secondary color is an accent color used for brand expression. It should typically be used with text and icons for emphasis, or with borders to accentuate a particular component - it should not be used to fill surfaces.

getSurface

public final @NonNull Color getSurface()

The surface color that affect surfaces of components, such as buttons, cards, and list items. This should be Color.Black to ensure maximum contrast.

hashCode

public int hashCode()

toString

public @NonNull String toString()