scheme

package
v0.0.0-...-435824e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AmberTonalPalette = palettes.NewTonalPaletteFromInt(0xFFFFC107)
View Source
var BlueGreyTonalPalette = palettes.NewTonalPaletteFromInt(0xFF607D8B)
View Source
var BlueTonalPalette = palettes.NewTonalPaletteFromInt(0xFF2196F3)
View Source
var BrownTonalPalette = palettes.NewTonalPaletteFromInt(0xFF795548)
View Source
var CyanTonalPalette = palettes.NewTonalPaletteFromInt(0xFF00BCD4)
View Source
var DeepOrangeTonalPalette = palettes.NewTonalPaletteFromInt(0xFFFF5722)
View Source
var DeepPurpleTonalPalette = palettes.NewTonalPaletteFromInt(0xFF673AB7)
View Source
var ErrorTonalPalette = palettes.NewTonalPaletteFromInt(0xFFB3261E)
View Source
var GreenTonalPalette = palettes.NewTonalPaletteFromInt(0xFF4CAF50)
View Source
var GreyTonalPalette = palettes.NewTonalPaletteFromInt(0xFF9E9E9E)
View Source
var IndigoTonalPalette = palettes.NewTonalPaletteFromInt(0xFF3F51B5)
View Source
var LightBlueTonalPalette = palettes.NewTonalPaletteFromInt(0xFF03A9F4)
View Source
var LightGreenTonalPalette = palettes.NewTonalPaletteFromInt(0xFF8BC34A)
View Source
var LimeTonalPalette = palettes.NewTonalPaletteFromInt(0xFFCDDC39)
View Source
var NeutralTonalPalette = palettes.NewTonalPaletteFromInt(0xFF787579)
View Source
var NeutralVariantTonalPalette = palettes.NewTonalPaletteFromInt(0xFF79747E)
View Source
var OrangeTonalPalette = palettes.NewTonalPaletteFromInt(0xFFFF9800)
View Source
var PinkTonalPalette = palettes.NewTonalPaletteFromInt(0xFFE91E63)
View Source
var PrimaryTonalPalette = palettes.NewTonalPaletteFromInt(0xFF6750A4)
View Source
var PurpleTonalPalette = palettes.NewTonalPaletteFromInt(0xFF9C27B0)
View Source
var RedTonalPalette = palettes.NewTonalPaletteFromInt(0xFFF44336)
View Source
var SecondaryTonalPalette = palettes.NewTonalPaletteFromInt(0xFF625B71)
View Source
var TealTonalPalette = palettes.NewTonalPaletteFromInt(0xFF009688)
View Source
var TertiaryTonalPalette = palettes.NewTonalPaletteFromInt(0xFF7D5260)
View Source
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 Dark

func Dark(primary int, secondary int, tertiary int, neutral int, neutralVariant int) *Scheme

Dark creates a dark scheme based on the given color.

func Light

func Light(primary int, secondary int, tertiary int, neutral int, neutralVariant int) *Scheme

Light creates a light scheme based on the given color.

func (*Scheme) WithBackground

func (s *Scheme) WithBackground(background int) *Scheme

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) WithError

func (s *Scheme) WithError(err int) *Scheme

WithError sets the error color of the scheme.

func (*Scheme) WithErrorContainer

func (s *Scheme) WithErrorContainer(errorContainer int) *Scheme

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

func (s *Scheme) WithInverseOnSurface(inverseOnSurface int) *Scheme

WithInverseOnSurface sets the inverse on-surface color of the scheme.

func (*Scheme) WithInversePrimary

func (s *Scheme) WithInversePrimary(inversePrimary int) *Scheme

WithInversePrimary sets the inverse primary color of the scheme.

func (*Scheme) WithInverseSurface

func (s *Scheme) WithInverseSurface(inverseSurface int) *Scheme

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

func (s *Scheme) WithOnBackground(onBackground int) *Scheme

WithOnBackground sets the on-background color of the scheme.

func (*Scheme) WithOnError

func (s *Scheme) WithOnError(onError int) *Scheme

WithOnError sets the on-error color of the scheme.

func (*Scheme) WithOnErrorContainer

func (s *Scheme) WithOnErrorContainer(onErrorContainer int) *Scheme

WithOnErrorContainer sets the on-error container color of the scheme.

func (*Scheme) WithOnPrimary

func (s *Scheme) WithOnPrimary(onPrimary int) *Scheme

WithOnPrimary sets the on-primary color of the scheme.

func (*Scheme) WithOnPrimaryContainer

func (s *Scheme) WithOnPrimaryContainer(onPrimaryContainer int) *Scheme

WithOnPrimaryContainer sets the on-primary container color of the scheme.

func (*Scheme) WithOnSecondary

func (s *Scheme) WithOnSecondary(onSecondary int) *Scheme

WithOnSecondary sets the on-secondary color of the scheme.

func (*Scheme) WithOnSecondaryContainer

func (s *Scheme) WithOnSecondaryContainer(onSecondaryContainer int) *Scheme

WithOnSecondaryContainer sets the on-secondary container color of the scheme.

func (*Scheme) WithOnSurface

func (s *Scheme) WithOnSurface(onSurface int) *Scheme

WithOnSurface sets the on-surface color of the scheme.

func (*Scheme) WithOnSurfaceVariant

func (s *Scheme) WithOnSurfaceVariant(onSurfaceVariant int) *Scheme

WithOnSurfaceVariant sets the on-surface variant color of the scheme.

func (*Scheme) WithOnTertiary

func (s *Scheme) WithOnTertiary(onTertiary int) *Scheme

WithOnTertiary sets the on-tertiary color of the scheme.

func (*Scheme) WithOnTertiaryContainer

func (s *Scheme) WithOnTertiaryContainer(onTertiaryContainer int) *Scheme

WithOnTertiaryContainer sets the on-tertiary container color of the scheme.

func (*Scheme) WithOutline

func (s *Scheme) WithOutline(outline int) *Scheme

WithOutline sets the outline color of the scheme.

func (*Scheme) WithOutlineVariant

func (s *Scheme) WithOutlineVariant(outlineVariant int) *Scheme

WithOutlineVariant sets the outline variant color of the scheme.

func (*Scheme) WithPrimary

func (s *Scheme) WithPrimary(primary int) *Scheme

WithPrimary sets the primary color of the scheme.

func (*Scheme) WithPrimaryContainer

func (s *Scheme) WithPrimaryContainer(primaryContainer int) *Scheme

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) WithScrim

func (s *Scheme) WithScrim(scrim int) *Scheme

WithScrim sets the scrim color of the scheme.

func (*Scheme) WithSecondary

func (s *Scheme) WithSecondary(secondary int) *Scheme

WithSecondary sets the secondary color of the scheme.

func (*Scheme) WithSecondaryContainer

func (s *Scheme) WithSecondaryContainer(secondaryContainer int) *Scheme

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

func (s *Scheme) WithShadow(shadow int) *Scheme

WithShadow sets the shadow color of the scheme.

func (*Scheme) WithShadowTint

func (s *Scheme) WithShadowTint(shadowTint int) *Scheme

WithShadowTint sets the shadow tint color of the scheme.

func (*Scheme) WithSurface

func (s *Scheme) WithSurface(surface int) *Scheme

WithSurface sets the surface color of the scheme.

func (*Scheme) WithSurfaceBright

func (s *Scheme) WithSurfaceBright(surfaceBright int) *Scheme

WithSurfaceBright sets the bright surface color of the scheme.

func (*Scheme) WithSurfaceContainer

func (s *Scheme) WithSurfaceContainer(surfaceContainer int) *Scheme

WithSurfaceContainer sets the surface container color of the scheme.

func (*Scheme) WithSurfaceContainerHigh

func (s *Scheme) WithSurfaceContainerHigh(surfaceContainerHigh int) *Scheme

WithSurfaceContainerHigh sets the high surface container color of the scheme.

func (*Scheme) WithSurfaceContainerHighest

func (s *Scheme) WithSurfaceContainerHighest(surfaceContainerHighest int) *Scheme

WithSurfaceContainerHighest sets the highest surface container color of the scheme.

func (*Scheme) WithSurfaceContainerLow

func (s *Scheme) WithSurfaceContainerLow(surfaceContainerLow int) *Scheme

WithSurfaceContainerLow sets the low surface container color of the scheme.

func (*Scheme) WithSurfaceContainerLowest

func (s *Scheme) WithSurfaceContainerLowest(surfaceContainerLowest int) *Scheme

WithSurfaceContainerLowest sets the lowest surface container color of the scheme.

func (*Scheme) WithSurfaceDim

func (s *Scheme) WithSurfaceDim(surfaceDim int) *Scheme

WithSurfaceDim sets the dim surface color of the scheme.

func (*Scheme) WithSurfaceVariant

func (s *Scheme) WithSurfaceVariant(surfaceVariant int) *Scheme

WithSurfaceVariant sets the surface variant color of the scheme.

func (*Scheme) WithTertiary

func (s *Scheme) WithTertiary(tertiary int) *Scheme

WithTertiary sets the tertiary color of the scheme.

func (*Scheme) WithTertiaryContainer

func (s *Scheme) WithTertiaryContainer(tertiaryContainer int) *Scheme

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL