System colors #
All Kustom apps can extract color palette from different sources, such as:
- Wallpaper through the
System Info function:
- A given image using the
Bitmap Palette function:
- System palette either based on wallpaper or via Material You color, see below
Material You #
On devices supporting dynamic themes Kustom will try to extract the palette definition from the System. Following colors will then be available as variables through the System Info:
- Primary system accent color:
- Secondary system accent color:
- Tertiary system accent color:
- Primary system neutral color:
- Secondary system neutral color:
On all colors you can specify XX as the shade level, a lower number will give you a darker color, a higher number will give you a lighter color.
Resource names #
Android uses an inverted shade convention for material you colors in the range 1000 to 0, so the darkest color is 1000 and the lightest is 0. Kustom instead goes from 0 (darkest) to 100 (white). To convert from Kustom to Android shade just invert and remove one zero, so:
- system_accent1_1000 -> $si(sysca1, 0)
- system_accent2_100 -> $si(sysca2, 90)
- system_accent3_0 -> $si(sysca3, 100)
- system_neutral1_10 -> $si(syscn1, 99)
Devices below Android 12 or with no support for dynamic colors will still work with the functions above but Kustom will fallback to the default wallpaper based palette and use HSV to generate the the correct shade.
Known Issues #
Some system (like Samsung) has its own dynamic color theming set and Samsung created alongside with Google dynamic theme color set. Those values are not matching. Basically in OneUI 5, you have 2 sets of Color Theme. The whole system will use the Samsung one but Kustom apps will get the values from the Google palette. A solution is being investigated.