schemes

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContent

func NewContent(
	sourceColor color.Hct,
	isDark bool,
	construst float64,
	platform dynamic.Platform,
	version dynamic.Version,
) *dynamic.Scheme

NewContent create A scheme that places the source color in `Scheme.PrimaryContainer`.

Primary Container is the source color, adjusted for color relativity. It maintains constant appearance in light mode and dark mode. This adds ~5 tone in light mode, and subtracts ~5 tone in dark mode. Tertiary Container is the complement to the source color, using `TemperatureCache`. It also maintains constant appearance.

func NewExpressive

func NewExpressive(
	sourceColor color.Hct,
	isDark bool,
	construst float64,
	platform dynamic.Platform,
	version dynamic.Version,
) *dynamic.Scheme

NewExpressive creates a dynamic Color theme that is intentionally detached from the source color.

func NewFidelity

func NewFidelity(
	sourceColor color.Hct,
	isDark bool,
	construst float64,
	platform dynamic.Platform,
	version dynamic.Version,
) *dynamic.Scheme

NewFidelity crates A scheme that places the source color in `Scheme.primaryContainer`.

Primary Container is the source color, adjusted for color relativity. It maintains constant appearance in light mode and dark mode. This adds ~5 tone in light mode, and subtracts ~5 tone in dark mode. Tertiary Container is the complement to the source color, using `TemperatureCache`. It also maintains constant appearance.

func NewFruitSalad

func NewFruitSalad(
	sourceColor color.Hct,
	isDark bool,
	construst float64,
	platform dynamic.Platform,
	version dynamic.Version,
) *dynamic.Scheme

NewFruitSalad creates a playful theme - the source color's hue does not appear in the theme.

func NewMonochrome

func NewMonochrome(
	sourceColor color.Hct,
	isDark bool,
	construst float64,
	platform dynamic.Platform,
	version dynamic.Version,
) *dynamic.Scheme

NewMonochrome create a dynamic color theme that is grayscale.

func NewNeutral

func NewNeutral(
	sourceColor color.Hct,
	isDark bool,
	construst float64,
	platform dynamic.Platform,
	version dynamic.Version,
) *dynamic.Scheme

NewNeutral crates a dynamic color theme that is near grayscale.

func NewRainbow

func NewRainbow(
	sourceColor color.Hct,
	isDark bool,
	construst float64,
	platform dynamic.Platform,
	version dynamic.Version,
) *dynamic.Scheme

NewRainbow create a playful theme - the source color's hue does not appear in the theme.

func NewTonalSpot

func NewTonalSpot(sourceColor color.Hct,
	isDark bool,
	construst float64,
	platform dynamic.Platform,
	version dynamic.Version,
) *dynamic.Scheme

NewTonalSpot creates a dynamic color theme with low to medium colorfulness and a Tertiary TonalPalette with a hue related to the source color.

The default Material You theme on Android 12 and 13.

func NewVibrant

func NewVibrant(
	sourceColor color.Hct,
	isDark bool,
	construst float64,
	platform dynamic.Platform,
	version dynamic.Version,
) *dynamic.Scheme

NewVibrant creates a dynamic color theme that maxes out colorfulness at each position in the Primary Tonal Palette.

Types

This section is empty.

Jump to

Keyboard shortcuts

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