Overview
Returns the complete Material Design 3 tonal palette with all tonal values (0-100) for neutral, primary, secondary, tertiary, and error colors. This provides the full spectrum of color variations used in Material Design 3.Method Signature
Parameters
Callback function that receives the palette objectCallback Parameters:
colors(object): Complete tonal palette with theme property
Returns
Complete tonal palette with the following structure:
Example
Example Response
Common Usage Patterns
Apply Palette to DOM
Use Specific Tonal Values
Use in CSS
After applying palette to DOM:Tonal Value Guide
- 0 - Black (
#000000) - 10-90 - Progressive lightening from dark to light
- 95 - Very light, near white
- 99 - Almost white
- 100 - White (
#FFFFFF)
Implementation Details
- Platform Support: Android 12+ (API level 32)
- Color Format: Hex color strings (e.g.,
#8D4E2A) - Total Colors: 65 tonal palette values
- Material Design: Follows M3 tonal palette specification
- Source Reference:
plugin.js:212-213,DynamicColor.java:225-336
The palette provides reference colors for advanced customization. For standard UI elements, use the
colors() method which provides semantic color tokens.Always check availability using
isDynamicColorAvailable() before calling this method. On unsupported devices, the palette object will be empty.Related Methods
colors()- Get semantic color system (recommended for most use cases)paletteToDom()- Apply palette as CSS variablespaletteToCssVars()- Convert palette to CSS variable string