summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author James O'Leary <jamesoleary@google.com> 2022-05-27 15:12:14 +0000
committer James O'Leary <jamesoleary@google.com> 2022-05-27 15:27:43 +0000
commitee04476acf2c3bd323729ad50c8ebac9dab21af1 (patch)
treee4c6706ecb2a52ac685f898cf23d91beb5a97f96 /libs/androidfw/StringPool.cpp
parentabfe28784c563258173f67002b5168ff2b599fea (diff)
Update light/dark detection.
Reset implementation based on design being comfortable with white shadows now, so there doesn't need to be a bias toward saying the wallpaper is dark. - use luminance/tone instead of HSL to judge contrast - if the median pixel has a luminance/tone less than mid-gray, the wallpaper is dark. - add a method to ColorUtils that returns luminance from a hex code without any allocations (avoids converting to LAB) End result is we move from judging a wallpaper as dark ~99% of the time to 54% of the time, based on Monet Studio implementation checking ~1000 wallpapers, including Google's default wallpapers. Bug: 213314628 Test: Manual inspection at runtime, long-running prototyping in Monet Studio with UX across ~1000 wallpapers Change-Id: Ia9122142728a8de9390b3e0471d7803376487864
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions