Merge "Ignore low chroma colors when calculating a hue's population" into sc-v2-dev am: 0c1eb6a2be
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16017740 Change-Id: I7a40509a063e19a24858e9ab021f5c0b1f900c34
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user