Loading
iconloaderlib: Adjust luminance delta to maintain contrast when applying monochrome icons.
This CL introduces a new column to the icon database that encodes the luminance delta of the original adaptive icon. This is done by comparing the luminance of the foreground and the background, and storing this information in the database. Then, when an icon is themed, this information is used to adapt the foreground and background colors to maintain contrast ratio between the two colors. This approach allows to preserve the look and feel of adaptive icons, while still allowing for theming. This change also fixes a bug where monochrome icons would have their color reversed when it was not appropriate. With this change we do not flip monochrome anymore. Bug: 418850749 Flag: com.android.launcher3.force_monochrome_app_icons Test: Added tests Change-Id: I52a8bda6301193f7741f82ac116a91e90525e98d