diff options
author | James O'Leary <jamesoleary@google.com> | 2021-10-08 12:29:21 -0400 |
---|---|---|
committer | James O'Leary <jamesoleary@google.com> | 2021-10-12 14:41:28 -0400 |
commit | 1b54c4aefb6cceb478b0ce6b154347265f5ccbdc (patch) | |
tree | cb8124152e4220900541023187b1e7ed84cf3c8e /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | ff265fecb9c72f40b281c979f21af3ed9112661f (diff) |
Ignore low chroma colors when calculating a hue's population
We rank/score colors for suitability for theming choices, and the top
4 are presented to the user.
The score has two components: the chroma, or colorfulness, of the color,
and the hue population of the color — what percentage of the image has
hues within 15 degrees of the color.
A wallpaper that is mostly black, green leaves, and a light dash of low
chroma red on a couple leaves, ends up ranking red as the highest choice
because black has a red hue.
Ignoring low chroma colors when calculating the hue population avoids
this issue — the dash of low chroma reds no longer benefits from their
hue being close to black, the majority of the image.
Bug: 201980078
Test: Push wallpaper from bug comment #4 to device, check color options.
Red is no longer offered as an option. To come: apply to Monet Studio,
verify no ill effects
Change-Id: Ib40a6646077e07c2cc85da339186d9a307709def
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions