diff options
| author | Danny Lin <danny@kdrag0n.dev> | 2021-10-05 16:02:15 -0700 |
|---|---|---|
| committer | Semavi Ulusoy <doc.divxm@gmail.com> | 2022-10-21 15:38:37 +0300 |
| commit | baf93cb5a7471cb31c4ae98cb199f22112e05cd7 (patch) | |
| tree | 5f94f7eccc952ec8f3b5249eb746638c6f7f5bd1 /core/java/android/inputmethodservice/InputMethodService.java | |
| parent | 05728b383b5608928581a351e608a58f9a495229 (diff) | |
graphics: Blend ARGB colors using Oklab
Blending colors directly in sRGB color space can result in unnatural
color shifts, and while linear sRGB is generally an improvement, it can
still suffer from the same issues.
The advent of dynamic tinted UI themes makes accurate blending more
important in animations that make use of blendARGB, such as the bubble
notification expand/collapse transition, so use Oklab [1] for blending
in order to improve quality. Oklab is one of the best
perceptually-uniform color spaces currently available [2] that is also
relatively simple and performant enough to use in this context.
Because the last step of Oklab is a linear matrix transformation that is
immediately reverted in the context of blending, the transformation is
unnecessary and has been removed for performance; see [3] for details.
[1] https://bottosson.github.io/posts/oklab/
[2] https://raphlinus.github.io/color/2021/01/18/oklab-critique.html
[3] https://www.shadertoy.com/view/ttcyRS
Change-Id: If72336a042943a49a067436e128f5e6a66acf8f0
Signed-off-by: Pranav <npv12@iitbbs.ac.in>
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
0 files changed, 0 insertions, 0 deletions
