summaryrefslogtreecommitdiff
path: root/packages/SystemUI/monet/src/com/android
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'android-13.0.0_r52' of ↵George Zacharia2023-08-021-38/+80
|\ | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into t13.0 Android 13.0.0 Release 52 (TQ3A.230605.012) Change-Id: Ic80f318636f1f70bbd009504352ddde511d0dead
| * Base color API updatesMarcelo Arteiro2022-12-141-38/+80
| | | | | | | | | | | | | | | | | | | | Including new tokens for shades base color and ColorScheme updates Test: atest ColorSchemeTest Test: atest ThemeOverlayControllerTest Test: atest SystemPaletteTest Bug: 241778903 Change-Id: I45a398245ae45adbfe58d32e11a4d18097e3eca1
* | Merge tag 'android-13.0.0_r35' of ↵George Zacharia2023-04-031-3/+10
|\| | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into t13.0 Android 13.0.0 release 35 Change-Id: I709958b2f015d1774b2ece25894467c3a279f93c
| * Monochromatic ThemeMarcelo Arteiro2022-10-191-3/+10
| | | | | | | | | | | | | | | | Definition of Monochromatic Theme and feature flag. Test: atest ColorSchemeTest Bug: 241778903 Change-Id: I3c729d9cb8f9eccb2e435849bd50a88513d99c0a
* | monet: Fix overly low chroma for tones below 90Danny Lin2022-10-211-1/+2
|/ | | | | | | | | | | | | | | | Chroma is capped to 40 for light colors of L* 90 and above for valid reasons. However, assigning the capped value to "chroma" fails to account for the fact that chroma is an argument passed to the method, so the capping effect persists across iterations. This unintentionally affects and limits the chroma of *all* shades because the first iteration of the loop is L*=90. As a result, almost all colors are less chromatic than the intended chroma >= 48. Fix the issue by assigning capped chroma to a temporary per-iteration variable. Change-Id: I18102d0072c89535e27f23fdb98af7c83864ff7e Signed-off-by: jhonboy121 <alfredmathew05@gmail.com>
* Fixes a crash ColorScheme#toStringMark Renouf2022-06-091-1/+1
| | | | | | | | | Fixes an IndexOutOfBoundsException in stringForColor whenever the value is between 0 and 15. Integer#toHexString does not zero pad. Bug: 234413479 Test: atest ColorSchemeTest#testToString Change-Id: I50f95ee8f2b1924bb1778b66ed39fa40685ef7e2
* Update Vibrant Neutral palette from 8 chroma to 10James O'Leary2022-06-061-1/+1
| | | | | | Test: atest ColorSchemeTest, atest SystemPaletteTest Bug: 213314628 Change-Id: I9ac96a2343afa0fd56b3e9ae8e8073f4ff5c1480
* Update ColorScheme.toString() formattingJames O'Leary2022-05-261-8/+23
| | | | | | | | | | | | | | ThemeOverlayController's is being used by designers for verification. To make that easier, the dumpsys now includes HCT coordinates, hex codes w/o alpha channel, and the seed color, which ColorScheme now stores in an instance variable. Test: adb shell dumpsys activity service com.android.systemui/.SystemUIService ThemeOverlayController; verify format works as intended. Shared with design, got feedback and confirmation this includes all needed info. Change-Id: I058d390b109a27e2277a2a74c1519c7b15a49400
* Match latest variant spec; update hue rotation logicJames O'Leary2022-05-261-47/+18
| | | | | | | | | | | | | | | | | | | | | | | | | - Update a couple rotations to match spec (ex. rotation occurs at 151 degrees instead of 141) - If hue rotation specs have an entry at 0 degrees, they also need an entry at 360 degrees. There's no way to determine that, for example, 321 is between 315 and 0, 360 must be listed. - Find hue rotation in a way that ensures ex. an angle isn't tested for being between 0 and 360 degrees, as that will always return true. Instead, use first element, (always 0 degrees), check if angle is between and the next element, and stop once the next element is 360 degrees (always the last element in the array) - Remove code that became unused after the above change. Test: atest ColorSchemeTest (unit test); atest SystemPaletteTest (CTS). Spent ~4 hours trying a variety of wallpapers, and seed colors, and used dumpsys to verify results match UX spec. Create spreadsheet for UX to fill out their spec, then another spreadsheet that contains the dumpsys results for blue/red/yellow/green seed colors across all theme variants, and the preset colors for Ice Cream and Fruit Salad variants. Confirmed the runtime results, as reported by dumpsys, match the spec in all cases. Bug: 213314628 Change-Id: Id35faa294bf82c0e81c2690c65c42218a87c236a
* Add 2 chroma to vibrant theme's specificationJames O'Leary2022-05-121-2/+2
| | | | | | Bug: 213314628 Test: Manual inspection at runtime Change-Id: I0f703254ec434f9dac17df7738d704586752143f
* Fix color scheme rotationJames O'Leary2022-05-121-1/+1
| | | | | | | | | | The first number in a Pair instance, the hue range to check against, was being used as the rotation value. The second number in the Pair instance should have been used. Bug: 213314628 Test: Manual inspection at runtime Change-Id: I9002522853f8a6cc6d38537f14fed04e256aa340
* Add content color scheme for mediaJames O'Leary2022-05-121-14/+39
| | | | | | | | | | | Use content color scheme for media player, which dynamically adapts color palette chromas to the source color, and permits monochrome source colors. Use for media. This allows ex. grayscale album covers to get a grayscale treatment in UI, per design requirement. Bug: 213314628 Test: Manual inspection at runtime Change-Id: Ib8ea007e34758cd7903b3432ab88af695cb22f68
* Add color scheme constructor that takes WallpaperColors & Style objectsJames O'Leary2022-04-271-2/+7
| | | | | | | | | | | | | | Pairs with, and needed for, a CL that enables Widgets to use the user-selected theme variant. Bug: 213314628 Test: visual inspection at runtime: use different wallpapers and widgets in different locations, change to different theme variants, observe changes and verify they're in line with expectations (ex. if a widget is blue in the default theme variant, in the expressive theme variant it rotates hue just like a blue theme color does in expressive hue) Change-Id: I288a4faeba06042037b468c8345414ef5547325c
* Adjust variants specs to match latest UX spec.James O'Leary2022-04-271-23/+17
| | | | | | | | | | | | | | | | - hue range cutoffs are rounded (ex. 30 instead of 27) - some changes to rotations - vibrant theme uses the higher of the theme color's chroma or 48, whichever is higher. - custom chroma for exactly one hue in the expressive neutral palette is removed, all hues use the same chroma, removing need for ChromaExpressiveNeutral Bug: 213314628 Test: atest ColorSchemeTest passes. Manual testing, ex. compare colorfulness of vibrant theme buttons in wallpaper picker before and after change Change-Id: I0bbec4dc9edbaa9097ad72c9b32b708db6bd064e
* Update styles to match latest specsJames O'Leary2022-03-162-52/+153
| | | | | | | | | | | | | | | A) Refactor hue/chroma specification to support specification of hue rotation and chroma depending on source color hue. Update vibrant & expressive specs to use granular specification of hue rotations for secondary and tertiary palettes for both, and expressive's neutral uses specification of chroma for the neutral palette. B) Use chroma equal to seed color for all palettes, replacing some usage of >= C) Remove chroma 40 cap at tone 90 Test: atest ColorSchemeTest Bug: N/A Change-Id: Ib9fff483443ccae888faf636d4388b9658ff3dfe
* Update theme specLucas Dupin2022-02-151-12/+12
| | | | | | | | UX feedback, using new chroma values Fixes: 219787214 Test: atest SystemPaletteTest Change-Id: I4754d4ade1ad8f59adadf158c8803a5812b106b0
* Add new ColorScheme stylesSantiago Etchebehere2022-02-031-0/+14
| | | | | | Bug: 202145221 Test: manual Change-Id: Ibaf5cd421380c4c38e2688ebe60216613d973b8f
* Hook up new styles to customization settingLucas Dupin2022-01-061-8/+9
| | | | | | | | | | | | | | | The new styles: - spritz - expressive - vibrant Are now correctly hooked up to the customization setting, allowing for picker integration. Bug: 195969565 Test: atest ThemeOverlayControllerTest Test: adb shell settings put secure theme_customization_overlay_packages '''\{\"android.theme.customization.system_palette\":\"B1611C\",\"android.theme.customization.theme_style\":\"SPRITZ\"}''' Change-Id: I106f05b7f0aade470b8216b47e14ca4aa6db0970
* ColorScheme provides options for stylingJames O'Leary2022-01-061-16/+100
| | | | | | | | | | | | | | | | - Add 5(!) lightweight classes for storing a design spec for a style. - Add parameter to ColorScheme constructor for Style - Add constructor replicating previous constructor for backwards compatibility with existing code, uses Tonal Spot as tyle - Reconfigure ColorScheme to use style to generate palettes Test: atest ColorSchemeTest passes. Change default style to style #1, make sure it works as intended, and matches what we've seen in mocks. Continue through all 4 styles. Bug: 213314628 Bug: 195969565 Change-Id: Iae2b4fc4ffd630bb4275f827798ae4643b230ae1
* Fix error computing tertiary hueJames O'Leary2021-11-091-1/+2
| | | | | | | | | | | | | After adding 60 degrees to the hue, the result needs to be normalized to 0 to 360. Code downstream of Shades.of does not perform the normalization, so the resulting color will be the result of undefined behavior. Test: `atest ColorSchemeTest`, newly added testTertiaryHueWrapsProperly passes. Bug: 204463343 Change-Id: I93168c98ba64fb865888469220571dc6d437105d
* Ignore low chroma colors when calculating a hue's populationJames O'Leary2021-10-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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
* [CP] Adjust chroma/lstar filters for seed colorsJames O'Leary2021-09-231-7/+11
| | | | | | | | | | | | | | | | | | | There is a set of wallpapers, namely some Landscape wallpapers, that don’t have any colors extracted from them. The wallpaper visually has some color to it, but, the chroma of those colors is low enough that they get filtered out by the low chroma filter. Lower the chroma filter from 15 to 5, and eliminate the tone filter (previously, L >= 10). Scoring compensates for this by prioritizing chromatic colors, thus ensuring these low-chroma options are only used if there’s no better options. Bug: b/200675148 Test: Push landscape wallpapers #912, #914, and #924 from Monet Studio to device. Verify color choices reflect wallpaper and aren't just fallback colors. Change-Id: I080e6cb51978638462a8b0ab41340aa11d495c93
* [CP] If there are > 4 colors, maximize differenceJames O'Leary2021-09-231-13/+21
| | | | | | Bug: 199389755 Test: atest ColorSchemeTest Change-Id: I4c2d76c9c92e96ca8259a4fc991e9e52b9e97ba9
* [CP] Use chroma max of 40 at tone 90James O'Leary2021-09-231-2/+7
| | | | | | Bug: 199389758 Test: atest ColorSchemeTest Change-Id: I295ef3a6ad4d64c26ef150c853ec9875cf2ad8ff
* Add monet to AOSPLucas Dupin2021-09-152-0/+310
Test: manual Test: atest ColorSchemeTest Test: atest SystemPalette Fixes: 199401230 Change-Id: I0695257765335f12ad47d5d8f40d0885c652bff6