wallpapers/color: better accent color generator from Android
The accent color is extracted using the Android method, which includes:
- Wu's quantization algorithm
- K-Means for color quantization by Celebi
- A color appearance model based on CAM16
- Color scores based on hue proportions and chroma.
Then a dominant color is extracted from the clusters, and the final color will be adjusted to be not too dark or too light.
Reference: https://doi.org/10.1016/j.imavis.2010.10.002
The Celebi color quantizer is transformed from
- https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/com/android/internal/graphics/palette/CelebiQuantizer.java
- https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/com/android/internal/graphics/palette/WSMeansQuantizer.java
- https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/com/android/internal/graphics/palette/WuQuantizer.java
- https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/com/android/internal/graphics/palette/QuantizerMap.java
The color appearance model and the color score formula are transformed from:
- https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/android/app/WallpaperColors.java
- https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/com/android/internal/graphics/ColorUtils.java
- https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/com/android/internal/graphics/cam/CamUtils.java
- https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/com/android/internal/graphics/cam/Frame.java
BUG: 457861 FIXED-IN: 5.26
Requires: plasma-desktop!1106 (merged)
Edited by Fushan Wen