Colors
class Colors
A set of named color parameters for a GlimmerTheme.
Summary
Public constructors |
|---|
Public functions |
|
|---|---|
Colors |
copy(Returns a copy of this Colors, optionally overriding some of the values. |
open operator Boolean |
|
open Int |
hashCode() |
open String |
toString() |
Public properties |
|
|---|---|
Color |
The background color that appears behind components. |
Color |
The negative color is used to indicate negative actions. |
Color |
Subtle color used for borders. |
Color |
Utility color used for borders for decorative elements when strong contrast is not required. |
Color |
The positive color is used to indicate positive or affirmative actions. |
Color |
The primary color is an accent color used for brand expression. |
Color |
The secondary color is an accent color used for brand expression. |
Color |
The surface color that's applied to surfaces of components, such as buttons, cards, and list items. |
Public constructors
Colors
Colors(
primary: Color = Color(0xFF9BBFFF),
secondary: Color = Color(0xFF4C88E9),
positive: Color = Color(0xFF63FEA8),
negative: Color = Color(0xFFFFA7A0),
background: Color = Color.Black,
surface: Color = Color(0xFF262626),
outline: Color = Color(0xFF606460),
outlineVariant: Color = Color(0xFF42434A)
)
Public functions
copy
fun copy(
primary: Color = this.primary,
secondary: Color = this.secondary,
positive: Color = this.positive,
negative: Color = this.negative,
background: Color = this.background,
surface: Color = this.surface,
outline: Color = this.outline,
outlineVariant: Color = this.outlineVariant
): Colors
Returns a copy of this Colors, optionally overriding some of the values.
Public properties
background
val background: Color
The background color that appears behind components. This should be Color.Black to ensure maximum contrast.
negative
val negative: Color
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.
outline
val outline: Color
Subtle color used for borders. This color helps to add contrast around components for accessibility purposes.
outlineVariant
val outlineVariant: Color
Utility color used for borders for decorative elements when strong contrast is not required.
positive
val positive: Color
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.
primary
val primary: Color
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.