Import theming code from Android 12 Extensions

This is a dynamic theme engine that takes a single input color and
generates a Material You color palette, which is useful for implementing
dynamic wallpaper-based theming ("Monet") for Android 12.

Color science overview:
  - Colors manipulated with ZCAM color appearance model
  - Lightness taken from Material You targets
  - Chroma clamped between 0 (grayscale) and Material You targets (per
    swatch)
  - Lightness- and hue-preserving gamut mapping via gamut intersection

If accurateShades is set to true (default), the resulting colors are
guaranteed to follow Material You lightness targets and thus contrast is
guaranteed if the palette is used correctly.

Code imported from Android 12 Extensions v8.0.0 [1].

Demo screenshots: https://twitter.com/kdrag0n/status/1445584174790832134

[1] https://github.com/kdrag0n/android12-extensions
4 files changed
tree: d630cc12b5d238aa664e2b6592c321484fb9c2af
  1. src/
  2. Android.bp
  3. LICENSE