Documentation ¶
Index ¶
- Variables
- type Scheme
- func (s *Scheme) WithBackground(background int) *Scheme
- func (s *Scheme) WithCustomTonalPalette(customTone *palettes.TonalPalette, isDark bool) *Scheme
- func (s *Scheme) WithError(err int) *Scheme
- func (s *Scheme) WithErrorContainer(errorContainer int) *Scheme
- func (s *Scheme) WithErrorTonalPalette(errorTone *palettes.TonalPalette, isDark bool) *Scheme
- func (s *Scheme) WithInverseOnSurface(inverseOnSurface int) *Scheme
- func (s *Scheme) WithInversePrimary(inversePrimary int) *Scheme
- func (s *Scheme) WithInverseSurface(inverseSurface int) *Scheme
- func (s *Scheme) WithNeutralTonalPalette(neutralTone *palettes.TonalPalette, isDark bool) *Scheme
- func (s *Scheme) WithNeutralVariantTonalPalette(neutralVariantTone *palettes.TonalPalette, isDark bool) *Scheme
- func (s *Scheme) WithOnBackground(onBackground int) *Scheme
- func (s *Scheme) WithOnError(onError int) *Scheme
- func (s *Scheme) WithOnErrorContainer(onErrorContainer int) *Scheme
- func (s *Scheme) WithOnPrimary(onPrimary int) *Scheme
- func (s *Scheme) WithOnPrimaryContainer(onPrimaryContainer int) *Scheme
- func (s *Scheme) WithOnSecondary(onSecondary int) *Scheme
- func (s *Scheme) WithOnSecondaryContainer(onSecondaryContainer int) *Scheme
- func (s *Scheme) WithOnSurface(onSurface int) *Scheme
- func (s *Scheme) WithOnSurfaceVariant(onSurfaceVariant int) *Scheme
- func (s *Scheme) WithOnTertiary(onTertiary int) *Scheme
- func (s *Scheme) WithOnTertiaryContainer(onTertiaryContainer int) *Scheme
- func (s *Scheme) WithOutline(outline int) *Scheme
- func (s *Scheme) WithOutlineVariant(outlineVariant int) *Scheme
- func (s *Scheme) WithPrimary(primary int) *Scheme
- func (s *Scheme) WithPrimaryContainer(primaryContainer int) *Scheme
- func (s *Scheme) WithPrimaryTonalPalette(primaryTone *palettes.TonalPalette, isDark bool) *Scheme
- func (s *Scheme) WithScrim(scrim int) *Scheme
- func (s *Scheme) WithSecondary(secondary int) *Scheme
- func (s *Scheme) WithSecondaryContainer(secondaryContainer int) *Scheme
- func (s *Scheme) WithSecondaryTonalPalette(secondaryTone *palettes.TonalPalette, isDark bool) *Scheme
- func (s *Scheme) WithShadow(shadow int) *Scheme
- func (s *Scheme) WithShadowTint(shadowTint int) *Scheme
- func (s *Scheme) WithSurface(surface int) *Scheme
- func (s *Scheme) WithSurfaceBright(surfaceBright int) *Scheme
- func (s *Scheme) WithSurfaceContainer(surfaceContainer int) *Scheme
- func (s *Scheme) WithSurfaceContainerHigh(surfaceContainerHigh int) *Scheme
- func (s *Scheme) WithSurfaceContainerHighest(surfaceContainerHighest int) *Scheme
- func (s *Scheme) WithSurfaceContainerLow(surfaceContainerLow int) *Scheme
- func (s *Scheme) WithSurfaceContainerLowest(surfaceContainerLowest int) *Scheme
- func (s *Scheme) WithSurfaceDim(surfaceDim int) *Scheme
- func (s *Scheme) WithSurfaceVariant(surfaceVariant int) *Scheme
- func (s *Scheme) WithTertiary(tertiary int) *Scheme
- func (s *Scheme) WithTertiaryContainer(tertiaryContainer int) *Scheme
- func (s *Scheme) WithTertiaryTonalPalette(tertiaryTone *palettes.TonalPalette, isDark bool) *Scheme
Constants ¶
This section is empty.
Variables ¶
var AmberTonalPalette = palettes.NewTonalPaletteFromInt(0xFFFFC107)
var BlueGreyTonalPalette = palettes.NewTonalPaletteFromInt(0xFF607D8B)
var BlueTonalPalette = palettes.NewTonalPaletteFromInt(0xFF2196F3)
var BrownTonalPalette = palettes.NewTonalPaletteFromInt(0xFF795548)
var CyanTonalPalette = palettes.NewTonalPaletteFromInt(0xFF00BCD4)
var DeepOrangeTonalPalette = palettes.NewTonalPaletteFromInt(0xFFFF5722)
var DeepPurpleTonalPalette = palettes.NewTonalPaletteFromInt(0xFF673AB7)
var ErrorTonalPalette = palettes.NewTonalPaletteFromInt(0xFFB3261E)
var GreenTonalPalette = palettes.NewTonalPaletteFromInt(0xFF4CAF50)
var GreyTonalPalette = palettes.NewTonalPaletteFromInt(0xFF9E9E9E)
var IndigoTonalPalette = palettes.NewTonalPaletteFromInt(0xFF3F51B5)
var LightBlueTonalPalette = palettes.NewTonalPaletteFromInt(0xFF03A9F4)
var LightGreenTonalPalette = palettes.NewTonalPaletteFromInt(0xFF8BC34A)
var LimeTonalPalette = palettes.NewTonalPaletteFromInt(0xFFCDDC39)
var NeutralTonalPalette = palettes.NewTonalPaletteFromInt(0xFF787579)
var NeutralVariantTonalPalette = palettes.NewTonalPaletteFromInt(0xFF79747E)
var OrangeTonalPalette = palettes.NewTonalPaletteFromInt(0xFFFF9800)
var PinkTonalPalette = palettes.NewTonalPaletteFromInt(0xFFE91E63)
var PrimaryTonalPalette = palettes.NewTonalPaletteFromInt(0xFF6750A4)
var PurpleTonalPalette = palettes.NewTonalPaletteFromInt(0xFF9C27B0)
var RedTonalPalette = palettes.NewTonalPaletteFromInt(0xFFF44336)
var SecondaryTonalPalette = palettes.NewTonalPaletteFromInt(0xFF625B71)
var TealTonalPalette = palettes.NewTonalPaletteFromInt(0xFF009688)
var TertiaryTonalPalette = palettes.NewTonalPaletteFromInt(0xFF7D5260)
var YellowTonalPalette = palettes.NewTonalPaletteFromInt(0xFFFFEB3B)
Functions ¶
This section is empty.
Types ¶
type Scheme ¶
type Scheme struct { // The primary key color is used to derive roles for key components across the UI, // such as the FAB, prominent buttons, active states, as well as the tint of elevated surfaces. Primary color.NRGBA // primary40 / primary80 OnPrimary color.NRGBA // primary90 / primary30 PrimaryContainer color.NRGBA // primary100 / primary20 OnPrimaryContainer color.NRGBA // primary10 / primary90 InversePrimary color.NRGBA // primary80 /primary40 // The secondary key color is used for less prominent components in the UI such as filter chips, // while expanding the opportunity for color expression. Secondary color.NRGBA // secondary40 / secondary80 OnSecondary color.NRGBA // secondary90 / secondary30 SecondaryContainer color.NRGBA // secondary100 / secondary20 OnSecondaryContainer color.NRGBA // secondary10 / secondary90 // The tertiary key color is used to derive the roles of contrasting accents that can be used // to balance primary and secondary colors or bring heightened attention to an element. // The tertiary color role is left for teams to use at their discretion and is intended // to support broader color expression in products. Tertiary color.NRGBA // tertiary40 / tertiary80 OnTertiary color.NRGBA // tertiary90 / tertiary30 TertiaryContainer color.NRGBA // tertiary100 / tertiary20 OnTertiaryContainer color.NRGBA // tertiary10 / tertiary90 // The custom key color is used to derive the roles of contrasting accents that can be used // to balance primary and secondary colors or bring heightened attention to an element. // The custom color role is left for teams to use at their discretion and is intended // to support broader color expression in products. Custom color.NRGBA // custom40 / custom80 OnCustom color.NRGBA // custom90 / custom30 CustomContainer color.NRGBA // custom100 / custom20 OnCustomContainer color.NRGBA // custom10 / custom90 // Error color.NRGBA // error40 / error80 OnError color.NRGBA // error90 / error30 ErrorContainer color.NRGBA // error100 / error20 OnErrorContainer color.NRGBA // error10 / error90 // The neutral key color is used to derive surface color roles for backgrounds, as well // as colors used for high emphasis text and icons. // The neutral variant key color is used to derive color roles for medium emphasis elements // like text, icons, and component outlines Surface color.NRGBA // neutral98 / neutral6 SurfaceDim color.NRGBA // neutral87 / neutral6 SurfaceBright color.NRGBA // neutral98 / neutral24 SurfaceContainerLowest color.NRGBA // neutral100 / neutral4 SurfaceContainerLow color.NRGBA // neutral96 / neutral10 SurfaceContainer color.NRGBA // neutral94 / neutral12 SurfaceContainerHigh color.NRGBA // neutral92 / neutral17 SurfaceContainerHighest color.NRGBA // neutral90 / neutral22 SurfaceVariant color.NRGBA // neutral-variant90 / neutral-variant30 OnSurface color.NRGBA // neutral0 / neutral90 OnSurfaceVariant color.NRGBA // neutral-variant30 / neutral-variant80 InverseSurface color.NRGBA // neutral20 / neutral90 InverseOnSurface color.NRGBA // neutral95 / neutral20 Background color.NRGBA // neutral98 / neutral6 OnBackground color.NRGBA // neutral0 / neutral90 Outline color.NRGBA // neutral-variant50 / neutral-variant60 OutlineVariant color.NRGBA // neutral-variant80 / neutral-variant30 Shadow color.NRGBA // neutral0 / neutral0 ShadowTint color.NRGBA // primary / primary Scrim color.NRGBA // neutral0 / neutral0 PrimaryTone color.NRGBA // primary50 SecondaryTone color.NRGBA // secondary50 TertiaryTone color.NRGBA // tertiary50 CustomTone color.NRGBA // custom50 NeutralTone color.NRGBA // neutral50 NeutralVariantTone color.NRGBA // neutral-variant50 ErrorTone color.NRGBA // error50 // contains filtered or unexported fields }
Scheme is a collection of colors that are used to represent the UI of an app.
func (*Scheme) WithBackground ¶
WithBackground sets the background color of the scheme.
func (*Scheme) WithCustomTonalPalette ¶
func (s *Scheme) WithCustomTonalPalette(customTone *palettes.TonalPalette, isDark bool) *Scheme
WithCustomTonalPalette sets the custom tonal palette of the scheme.
func (*Scheme) WithErrorContainer ¶
WithErrorContainer sets the error container color of the scheme.
func (*Scheme) WithErrorTonalPalette ¶
func (s *Scheme) WithErrorTonalPalette(errorTone *palettes.TonalPalette, isDark bool) *Scheme
WithErrorTonalPalette sets the error tonal palette of the scheme.
func (*Scheme) WithInverseOnSurface ¶
WithInverseOnSurface sets the inverse on-surface color of the scheme.
func (*Scheme) WithInversePrimary ¶
WithInversePrimary sets the inverse primary color of the scheme.
func (*Scheme) WithInverseSurface ¶
WithInverseSurface sets the inverse surface color of the scheme.
func (*Scheme) WithNeutralTonalPalette ¶
func (s *Scheme) WithNeutralTonalPalette(neutralTone *palettes.TonalPalette, isDark bool) *Scheme
WithNeutralTonalPalette sets the neutral tonal palette of the scheme.
func (*Scheme) WithNeutralVariantTonalPalette ¶
func (s *Scheme) WithNeutralVariantTonalPalette(neutralVariantTone *palettes.TonalPalette, isDark bool) *Scheme
WithNeutralVariantTonalPalette sets the neutral variant tonal palette of the scheme.
func (*Scheme) WithOnBackground ¶
WithOnBackground sets the on-background color of the scheme.
func (*Scheme) WithOnError ¶
WithOnError sets the on-error color of the scheme.
func (*Scheme) WithOnErrorContainer ¶
WithOnErrorContainer sets the on-error container color of the scheme.
func (*Scheme) WithOnPrimary ¶
WithOnPrimary sets the on-primary color of the scheme.
func (*Scheme) WithOnPrimaryContainer ¶
WithOnPrimaryContainer sets the on-primary container color of the scheme.
func (*Scheme) WithOnSecondary ¶
WithOnSecondary sets the on-secondary color of the scheme.
func (*Scheme) WithOnSecondaryContainer ¶
WithOnSecondaryContainer sets the on-secondary container color of the scheme.
func (*Scheme) WithOnSurface ¶
WithOnSurface sets the on-surface color of the scheme.
func (*Scheme) WithOnSurfaceVariant ¶
WithOnSurfaceVariant sets the on-surface variant color of the scheme.
func (*Scheme) WithOnTertiary ¶
WithOnTertiary sets the on-tertiary color of the scheme.
func (*Scheme) WithOnTertiaryContainer ¶
WithOnTertiaryContainer sets the on-tertiary container color of the scheme.
func (*Scheme) WithOutline ¶
WithOutline sets the outline color of the scheme.
func (*Scheme) WithOutlineVariant ¶
WithOutlineVariant sets the outline variant color of the scheme.
func (*Scheme) WithPrimary ¶
WithPrimary sets the primary color of the scheme.
func (*Scheme) WithPrimaryContainer ¶
WithPrimaryContainer sets the primary container color of the scheme.
func (*Scheme) WithPrimaryTonalPalette ¶
func (s *Scheme) WithPrimaryTonalPalette(primaryTone *palettes.TonalPalette, isDark bool) *Scheme
WithPrimaryTonalPalette sets the primary tonal palette of the scheme.
func (*Scheme) WithSecondary ¶
WithSecondary sets the secondary color of the scheme.
func (*Scheme) WithSecondaryContainer ¶
WithSecondaryContainer sets the secondary container color of the scheme.
func (*Scheme) WithSecondaryTonalPalette ¶
func (s *Scheme) WithSecondaryTonalPalette(secondaryTone *palettes.TonalPalette, isDark bool) *Scheme
WithSecondaryTonalPalette sets the secondary tonal palette of the scheme.
func (*Scheme) WithShadow ¶
WithShadow sets the shadow color of the scheme.
func (*Scheme) WithShadowTint ¶
WithShadowTint sets the shadow tint color of the scheme.
func (*Scheme) WithSurface ¶
WithSurface sets the surface color of the scheme.
func (*Scheme) WithSurfaceBright ¶
WithSurfaceBright sets the bright surface color of the scheme.
func (*Scheme) WithSurfaceContainer ¶
WithSurfaceContainer sets the surface container color of the scheme.
func (*Scheme) WithSurfaceContainerHigh ¶
WithSurfaceContainerHigh sets the high surface container color of the scheme.
func (*Scheme) WithSurfaceContainerHighest ¶
WithSurfaceContainerHighest sets the highest surface container color of the scheme.
func (*Scheme) WithSurfaceContainerLow ¶
WithSurfaceContainerLow sets the low surface container color of the scheme.
func (*Scheme) WithSurfaceContainerLowest ¶
WithSurfaceContainerLowest sets the lowest surface container color of the scheme.
func (*Scheme) WithSurfaceDim ¶
WithSurfaceDim sets the dim surface color of the scheme.
func (*Scheme) WithSurfaceVariant ¶
WithSurfaceVariant sets the surface variant color of the scheme.
func (*Scheme) WithTertiary ¶
WithTertiary sets the tertiary color of the scheme.
func (*Scheme) WithTertiaryContainer ¶
WithTertiaryContainer sets the tertiary container color of the scheme.
func (*Scheme) WithTertiaryTonalPalette ¶
func (s *Scheme) WithTertiaryTonalPalette(tertiaryTone *palettes.TonalPalette, isDark bool) *Scheme
WithTertiaryTonalPalette sets the tertiary tonal palette of the scheme.