Google opens Android 12 dynamic theme color system source code: iOS can also be used

Source: Fast Technology

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 Utilities codebase at the heart of the feature, bringing the feature to more platforms, including iOS.

Project address: https://github.com/material-foundation/material-color-utilities

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 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, Googel 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.

开源前哨Daily sharing of popular, interesting and useful open source projects. Participate in the maintenance of 100,000+ Star open source technology resource libraries, including: Python, Java, C/C++, Go, JS, CSS, Node.js, PHP, .NET, etc.

Guess you like

Origin blog.csdn.net/osfront/article/details/123070190