Documentation ¶
Index ¶
- Variables
- func WithColorScheme(colorScheme ColorScheme) func(opt *theming)
- func WithTypography(typography Typography) func(opt *theming)
- type ColorScheme
- type ColorSchemeOptionFunc
- func AsDarkMode() ColorSchemeOptionFunc
- func WithCustomKeyColor(role colorrole.ColorRole, keyColor color.Color) ColorSchemeOptionFunc
- func WithNeutralKeyColor(keyColor color.Color) ColorSchemeOptionFunc
- func WithNeutralVariantKeyColor(keyColor color.Color) ColorSchemeOptionFunc
- func WithSecondaryKeyColor(keyColor color.Color) ColorSchemeOptionFunc
- func WithTertiaryKeyColor(keyColor color.Color) ColorSchemeOptionFunc
- type FontProvider
- type Fonts
- type OptionFunc
- type Theming
- type TonalPalette
- type TypeScales
- type Typography
- type TypographyOptionFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var Context = contextutil.New[Theming]()
View Source
var DefaultColorScheme = ColorSchemeFrom(f32color.RGB(0x6750A4))
View Source
var DefaultTypography = NewTypography()
Functions ¶
func WithColorScheme ¶
func WithColorScheme(colorScheme ColorScheme) func(opt *theming)
func WithTypography ¶
func WithTypography(typography Typography) func(opt *theming)
Types ¶
type ColorScheme ¶
func ColorSchemeFrom ¶
func ColorSchemeFrom(primaryKeyColor color.Color, optionFns ...ColorSchemeOptionFunc) ColorScheme
type ColorSchemeOptionFunc ¶
type ColorSchemeOptionFunc func(p *palette)
func AsDarkMode ¶
func AsDarkMode() ColorSchemeOptionFunc
func WithCustomKeyColor ¶
func WithCustomKeyColor(role colorrole.ColorRole, keyColor color.Color) ColorSchemeOptionFunc
func WithNeutralKeyColor ¶
func WithNeutralKeyColor(keyColor color.Color) ColorSchemeOptionFunc
func WithNeutralVariantKeyColor ¶
func WithNeutralVariantKeyColor(keyColor color.Color) ColorSchemeOptionFunc
func WithSecondaryKeyColor ¶
func WithSecondaryKeyColor(keyColor color.Color) ColorSchemeOptionFunc
func WithTertiaryKeyColor ¶
func WithTertiaryKeyColor(keyColor color.Color) ColorSchemeOptionFunc
type FontProvider ¶
type OptionFunc ¶
type OptionFunc = func(opt *theming)
type Theming ¶
type Theming interface { Typography ColorScheme }
func New ¶
func New(optFns ...OptionFunc) Theming
type TonalPalette ¶
func TonalPaletteFromHueAndChroma ¶
func TonalPaletteFromHueAndChroma(hue, chroma float32) TonalPalette
type TypeScales ¶
func CreateDefaultTypeScales ¶
func CreateDefaultTypeScales(fp FontProvider) TypeScales
type Typography ¶
type Typography interface { FontProvider TypeScale(typeScale typescale.TypeScale) text.Style }
func NewTypography ¶
func NewTypography(opts ...TypographyOptionFunc) Typography
type TypographyOptionFunc ¶
type TypographyOptionFunc func(t *typography)
func WithFonts ¶
func WithFonts(fonts Fonts) TypographyOptionFunc
func WithTypeScales ¶
func WithTypeScales(create func(fp FontProvider) TypeScales) TypographyOptionFunc
Click to show internal directories.
Click to hide internal directories.