Class DynamicPalette
- java.lang.Object
-
- org.pushingpixels.ephemeral.chroma.dynamiccolor.DynamicPalette
-
- All Implemented Interfaces:
TokenPalette
public class DynamicPalette extends java.lang.Object implements TokenPalette
Provides important settings for creating colors dynamically, and a tonal palette. Requires: 1. A color. (source color) 2. Whether or not its dark mode. 3. Contrast level. (-1 to 1, currently contrast ratio 3.0 and 7.0)
-
-
Field Summary
Fields Modifier and Type Field Description ContainerConfigurationcontainerConfigurationTonalPalettepalettedoublesourceColorTone
-
Constructor Summary
Constructors Constructor Description DynamicPalette(Hct sourceColorHct, ContainerConfiguration containerConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAccentOnContainer()intgetArgb(DynamicPaletteColor dynamicPaletteColor)intgetComplementaryContainerOutline()intgetComplementaryOnContainer()intgetContainerOutline()intgetContainerOutlineVariant()intgetContainerSurface()intgetContainerSurfaceBright()intgetContainerSurfaceDim()intgetContainerSurfaceHigh()intgetContainerSurfaceHighest()intgetContainerSurfaceLow()intgetContainerSurfaceLowest()HctgetHct(DynamicPaletteColor dynamicPaletteColor)intgetInverseContainerOutline()intgetInverseContainerSurface()intgetInverseOnContainer()intgetOnContainer()intgetOnContainerVariant()
-
-
-
Field Detail
-
containerConfiguration
public final ContainerConfiguration containerConfiguration
-
palette
public final TonalPalette palette
-
sourceColorTone
public final double sourceColorTone
-
-
Constructor Detail
-
DynamicPalette
public DynamicPalette(Hct sourceColorHct, ContainerConfiguration containerConfiguration)
-
-
Method Detail
-
getHct
public Hct getHct(DynamicPaletteColor dynamicPaletteColor)
-
getArgb
public int getArgb(DynamicPaletteColor dynamicPaletteColor)
-
getContainerSurfaceLowest
public int getContainerSurfaceLowest()
- Specified by:
getContainerSurfaceLowestin interfaceTokenPalette
-
getContainerSurfaceLow
public int getContainerSurfaceLow()
- Specified by:
getContainerSurfaceLowin interfaceTokenPalette
-
getContainerSurface
public int getContainerSurface()
- Specified by:
getContainerSurfacein interfaceTokenPalette
-
getContainerSurfaceHigh
public int getContainerSurfaceHigh()
- Specified by:
getContainerSurfaceHighin interfaceTokenPalette
-
getContainerSurfaceHighest
public int getContainerSurfaceHighest()
- Specified by:
getContainerSurfaceHighestin interfaceTokenPalette
-
getContainerSurfaceDim
public int getContainerSurfaceDim()
- Specified by:
getContainerSurfaceDimin interfaceTokenPalette
-
getContainerSurfaceBright
public int getContainerSurfaceBright()
- Specified by:
getContainerSurfaceBrightin interfaceTokenPalette
-
getOnContainer
public int getOnContainer()
- Specified by:
getOnContainerin interfaceTokenPalette
-
getOnContainerVariant
public int getOnContainerVariant()
- Specified by:
getOnContainerVariantin interfaceTokenPalette
-
getContainerOutline
public int getContainerOutline()
- Specified by:
getContainerOutlinein interfaceTokenPalette
-
getContainerOutlineVariant
public int getContainerOutlineVariant()
- Specified by:
getContainerOutlineVariantin interfaceTokenPalette
-
getInverseContainerSurface
public int getInverseContainerSurface()
- Specified by:
getInverseContainerSurfacein interfaceTokenPalette
-
getInverseOnContainer
public int getInverseOnContainer()
- Specified by:
getInverseOnContainerin interfaceTokenPalette
-
getInverseContainerOutline
public int getInverseContainerOutline()
- Specified by:
getInverseContainerOutlinein interfaceTokenPalette
-
getComplementaryContainerOutline
public int getComplementaryContainerOutline()
- Specified by:
getComplementaryContainerOutlinein interfaceTokenPalette
-
getComplementaryOnContainer
public int getComplementaryOnContainer()
- Specified by:
getComplementaryOnContainerin interfaceTokenPalette
-
getAccentOnContainer
public int getAccentOnContainer()
- Specified by:
getAccentOnContainerin interfaceTokenPalette
-
-