In Android 12, Google added the Material You dynamic theme, which colors the theme based on the color of the user’s wallpaper. Recently, Google announced that it will open-source the Material Color utility codebase at the heart of the feature, bringing the feature to more platforms, including iOS.
It is reported that the essence of Material Color Utilities is a cross-platform color code library. Through this code library, developers can realize the function of the Material You dynamic theme on any platform.
According to information on GitHub, the codebase currently includes versions for Dart, Java, and Typescript, and Google plans to add versions for iOS, CSS, and GLSL in the future. In addition, Google also detailed in the open-source documentation how this dynamic theme system works.
To put it simply, when a user modifies the wallpaper on a device running the Android 12 system, the system will automatically collect the color of the wallpaper and integrate it step by step. The final statistics are a few main colors, which are left to the user’s choice or the algorithm to blindly select.
It is foreseeable that with the open-source of the Material Color Utilities code base, this dynamic theme color system will gradually no longer be exclusive to the Android native system, and we will see similar functions on more and more systems.