Merge "Ignore low chroma colors when calculating a hue's population" into sc-v2-dev

This commit is contained in:
James O'Leary
2021-10-15 14:25:13 +00:00
committed by Android (Google) Code Review

View File

@@ -249,6 +249,9 @@ public class ColorScheme(@ColorInt seed: Int, val darkTheme: Boolean) {
val population = populationByColor[entry.key]!!
val cam = camByColor[entry.key]!!
val hue = cam.hue.roundToInt() % 360
if (cam.chroma <= MIN_CHROMA) {
continue
}
huePopulation[hue] = huePopulation[hue] + population
}