Draft: wallpapers/color: add accent color extractor
This provides a better method to extract the accent color. Pixels are filtered by saturationF first. If the filtered collection doesn't contain enough samples, the default Breeze Blue color will be used.
Then a dominant color is extracted from the clusters. The dominant color is adjusted to have at least 0.5 saturationF, and the luminance is within the required range (WCAG 2.1).
Based on many tests, accent colors in light themes and in dark themes are treated differently.
- For dark themes, the luminance range is based on Success Criterion 1.4.11 Non-text Contrast.
- For light themes, the luminance range is based on Success Criterion 1.4.3 Contrast (Minimum).
BUG: 457861 FIXED-IN: 5.26
The function used to sort color clusters:
Requires: plasma-desktop!1106 (merged)
Edited by Fushan Wen