DynamicScheme

Provides important settings for creating colors dynamically, and 6 color palettes. Requires: 1. A color. (source color) 2. A theme. (Variant) 3. Whether or not its dark mode. 4. Contrast level. (-1 to 1, currently contrast ratio 3.0 and 7.0)

Inheritors

Constructors

Link copied to clipboard
constructor(sourceColorHct: Hct, variant: Variant, isDark: Boolean, contrastLevel: Double, primaryPalette: TonalPalette, secondaryPalette: TonalPalette, tertiaryPalette: TonalPalette, neutralPalette: TonalPalette, neutralVariantPalette: TonalPalette)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun getRotatedHue(sourceColorHct: Hct, hues: Array<Double>, rotations: Array<Double>): Double
Given a set of hues and set of hue rotations, locate which hues the source color's hue is between, apply the rotation at the same index as the first hue in the range, and return the rotated hue.