App-level wallpaper color palette generation for Android 5.0+

Overview

MonetCompat

MonetCompat

JitPack badge

MonetCompat is an app-level implementation of kdrag0n's custom Monet implementation, based on his android12-extensions module. With MonetCompat you can generate color palettes from a user's wallpaper and use them anywhere in your app. It supports Android 5.0 and above (in Palette compatibility mode) and Android 8.1 and above in normal mode.

MonetCompat is currently in beta, so feedback and bug reports are greatly appreciated. It's also not currently known if Google will provide their own backwards compatibility library for Monet with Android 12's release, so this library may be replaced by an official one eventually.

No proprietary Google code is used in this project, and thus it is licensed with the MIT license for use in third party apps.

Platform Support

As mentioned above, MonetCompat supports Android 5.0 and above. There are however a few of configurations to consider:

Platform Static Wallpaper Live Wallpaper
Android 5.0 - 8.0 (no Palette)
Android 5.0 - 8.0 (with Palette)
Android 8.0+ *

* Live Wallpapers must implement WallpaperService.onComputeColors for color extraction.

Usage

First, follow the steps on the Setup page to add the dependency, and set up your Activities to handle Monet

Next, to apply Monet colors to views, check out the Usage page.

For more advanced usage, including explanations of other fields in MonetCompat, MonetCompatActivity and MonetFragment, see the Advanced Usage page.

MonetCompat also includes a few prebuilt custom Views that implement Monet and Material You styles, as well as a custom stretch overscroll effect, like the one in Android 12. More info can be found on the Material You page

Apps using MonetCompat

DarQ

Comments
  • java.lang.NoClassDefFoundError

    java.lang.NoClassDefFoundError

    This error may be reported if the project is used by default. I also read your setup, you seem to forget to say to want to put the com. Google. Android. The above material upgrade for 1.5.0. The default now seems to be 1.4.0

    invalid 
    opened by huaweikai 7
  • Request: make it clearer what this library is doing, using screenshots on the main page

    Request: make it clearer what this library is doing, using screenshots on the main page

    Took me some time to understand what it's all about, because it's written in an unclear way:

    "MonetCompat is an app-level implementation of kdrag0n's custom Monet implementation, used in his android12-extensions module"

    It should say that it takes the colors out of wallpapers and be able to apply them inside the app on various Views, no?

    opened by AndroidDeveloperLB 6
  • Library Question

    Library Question

    I'm currently using a wallpaper change listener I forked from pixel launcher in my launcher app project, is this basically the same thing but... works?

    opened by rgocal 4
  • Jetpack Compose support

    Jetpack Compose support

    I've manage to get MonetCompat to recreate (almost) 1:1 official Jetpack compose color scheme generation Both are with the same wallpaper |MaterialTheme3.dynamicLightColorScheme() |MonetCompat| |----|----| |Android 12L|Android 10| image image

    Here is the implementation https://github.com/rozPierog/Cofi/blob/f8676add8d072d04ecafc082f98a6015cb25c3cc/app/src/main/java/com/omelan/cofi/ui/Theme.kt#L31

    I would like to contribute this code to this repo so that everyone can use it easily. Is it okay? Or should I create separate repo and publish it separately.

    opened by rozPierog 2
  • Jetpack Compose Theme\ColorShemes

    Jetpack Compose Theme\ColorShemes

    Closes #6

    I'm happy to change adjust my code to better fit this repo style if you have issues with that. I've tried to add as little as possible to the code while also maintaining style that Jetpack Compose users will be familiar with.

    opened by rozPierog 1
  • 1.4

    1.4

    • Improved color change listeners, including better support for Android 12, not using ACTION_WALLPAPER_CHANGED where possible, and fixing the colors not changing after the system colors changed on 12
    • Whether to use system colors now takes into account DynamicColors.isDynamicColorAvailable() from Material Components for devices that run 12, but don't have Monet - MonetCompat will automatically fall back to the generated colors in that scenario.
    • MonetToolbar is now a MaterialToolbar to allow better integration with M3
    • Added md3style option to BottomNavigationView.applyMonet (enabled by default) to theme the new highlight
    • Added the ability to set the tooltip color for Slider (enabled by default)
    • Updated sample to use Material3 styles
    opened by KieronQuinn 0
  • 0.2

    0.2

    New:

    • Updated Monet base code from kdrag0n's android12-extensions
    • Implement support for SystemColorScheme (loads system colors on Android 12). This is enabled by default, for consistency on users' devices. You can disable it with the field option in MonetCompat.
    • Implement support for ColorSchemeFactory, which allows advanced control over color generation. See the sample for usage. Fixes:
    • Fixed a crash when using MonetToolbar without material-dialogs due to an incorrect import Breaking changes:
    • onMonetColorsChanged now takes a ColorScheme rather than DynamicColorScheme. ColorScheme is the interface, and this should really have been the case since day 1.
    opened by KieronQuinn 0
  • MonetCompatActivity memory leaks

    MonetCompatActivity memory leaks

    1. MonetCompat is a singleton that stores its own instance in the INSTANCE field. The problem is that MonetCompatActivity creates it by passing itself as context. As a result, when the activity is destroyed, it remains bound to MonetCompat and cannot be released by the garbage collector.

    2. The MonetCompat registers the BroadcastReceiver in the setup method if running on Android 12 or older versions of Android. The MonetCompatActivity calls setup on creation by passing itself to it as context. However, when the activity is destroyed, this BroadcastReceiver is not unregistered, which leads to activity leakage.

    For me, the only way to avoid these leaks is to stop using MonetCompatActivity and initialize MonetCompat myself using the application context.

    opened by zobnin 0
  • No static method MonetCompatDynamicTheme With Jetpack Compose

    No static method MonetCompatDynamicTheme With Jetpack Compose

    I followed the setup guide (enable PaletteCompat in Application, implement custom MonetCompatActivity based on ComponentActivity, using MonetCompatDynamicTheme) but I'm getting this error when trying to run my application

    java.lang.NoSuchMethodError: No static method MonetCompatDynamicTheme(Lcom/kieronquinn/monetcompat/core/MonetCompat;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V in class Lcom/kieronquinn/monetcompat/compose/MonetCompatThemeKt; or its super classes (declaration of 'com.kieronquinn.monetcompat.compose.MonetCompatThemeKt' appears in /data/app/~~W4-GVauu1KbA2jmEvOaszg==/com.owenlejeune.tvtime-GXupWNu-YmGy4Ey1Pr3eLw==/base.apk!classes13.dex)
    

    I tried enabling Multidex but that didn't solve the issue either.

    opened by owenlejeune 12
Releases(0.4.1)
  • 0.4.1(Jan 5, 2022)

    • Improved color change listeners, including better support for Android 12, not using ACTION_WALLPAPER_CHANGED where possible, and fixing the colors not changing after the system colors changed on 12
    • Whether to use system colors now takes into account DynamicColors.isDynamicColorAvailable() from Material Components for devices that run 12, but don't have Monet - MonetCompat will automatically fall back to the generated colors in that scenario.
    • MonetToolbar is now a MaterialToolbar to allow better integration with M3
    • Fixed MonetToolbar not using the right colors when fitsSystemWindows is enabled (thanks @shaz01!)
    • Added md3style option to BottomNavigationView.applyMonet (enabled by default) to theme the new highlight
    • Added the ability to set the tooltip color for Slider (enabled by default)

    (0.4.1 to force Jitpack to rebuild)

    Source code(tar.gz)
    Source code(zip)
  • 0.3(Nov 11, 2021)

  • 0.2.1(Sep 22, 2021)

    New:

    • Updated Monet base code from kdrag0n's android12-extensions
    • Implement support for SystemColorScheme (loads system colors on Android 12). This is enabled by default, for consistency on users' devices. You can disable it with the field option in MonetCompat.
    • Implement support for ColorSchemeFactory, which allows advanced control over color generation. See the sample for usage.

    Fixes:

    • Fixed a crash when using MonetToolbar without material-dialogs due to an incorrect import

    Breaking changes:

    • onMonetColorsChanged now takes a ColorScheme rather than DynamicColorScheme. ColorScheme is the interface, and this should really have been the case since day 1.
    Source code(tar.gz)
    Source code(zip)
Owner
Kieron Quinn
Kieron Quinn
Match a wallpaper to your color scheme

ImageTheming Change the color palette of an image to match your theme. Getting Started Use java -jar path/to/ImageTheming.jar -h to get all available

null 230 Dec 25, 2022
For color lovers! A simple but powerful Android color picker

#DEPRECATED Credits for the logo goes to Hafiz Ahmmed (https://github.com/hafizahmmed) ColorBox library Features Dynamic color preview; Change the col

Enrico D'Ortenzio 53 Apr 8, 2021
Color.kt is a modern color science library for Kotlin Multiplatform and Java.

Color.kt is a modern color science library for Kotlin Multiplatform and Java. It includes modern perceptually-uniform color spaces and color appearance models, such as Oklab and ZCAM.

Danny Lin 45 Oct 11, 2022
Color.kt is a modern color science library for Kotlin Multiplatform and Java.

Color.kt is a modern color science library for Kotlin Multiplatform and Java. It includes modern perceptually-uniform color spaces and color

SOSP-OS 0 Jan 21, 2022
Color picker library for Android

andColorPicker — Color Picker library for Android ?? Handy, ?? flexible, and ⚡ lightning-fast Android color picker views and utilities. ?? Features Cl

side.codes 216 Jan 7, 2023
Beautiful color picker dialog for Android 9+

Color-O-Matic Beautiful Color Picker dialog for Android 9+ based on VintageChroma by Pavel Sikun. Screenshots at the end of the file. Repository Add t

null 43 Jun 5, 2022
Color Picker — beautiful library for Android

Color Picker — beautiful library for Android Features Simple dialog builder ARGB, RGB & HSV color models Dark theme support Sliders with gradient back

Dmitriy 35 Dec 20, 2022
A modern color science library for Kotlin Multiplatform and Java

Color.kt Color.kt is a modern color science library for Kotlin Multiplatform and Java. It includes modern perceptually-uniform color spaces and color

Weeb Project (WIP) 0 Oct 21, 2021
A component that provides an HSV color picker, written in Jetpack compose🎨

A component that provides an HSV color picker, written in Jetpack compose??

GoDaddy 270 Dec 30, 2022
Jetpack Compose Color Picker

Bundle of Stylish customizable Color pickers, selectors, colorful sliders written with Jetpack Compose enables users to choose from HSL, HSV or RGB color modes to pick Solid colors or gradients.

Smart Tool Factory 34 Nov 29, 2022
Utility library that extends Jetpack Compose Colors with Material Design2 colors, Color swatches like in Flutter

????♾ Utility library that expands Compose Colors with Material Design2 colors, color swatches, Material Design 3 Tonal Palettes, color names, and utility functions to convert between HSL, HSV, RGB, HCT models and to HEX or from HEX

Smart Tool Factory 18 Dec 13, 2022
How to use Material You colors in your app

A small tool that help to see the colors generated by Material You.

Dmitry 25 Oct 14, 2022
Android Material Design Colors

Android-Material-Design-Colors Android-Material-Design-Colors provides color definitions of the Material Design. Demo Usage R.color.md_color_value or

wada811 197 Jan 2, 2023
A list of most useful resources for designing android apps such as all material colors and dimens, 180 Gradient background + html, social, flat, fluent, metro colors.

Timer UI Login UI Fitness UI Material-Resources-Library A list of most useful resources for designing android apps such as all material colors and dim

Next 37 Jul 24, 2022
Wallpaper is a Wallpaper and ringtone Application which allows user to set and download Wallpaper or ringtone.

Wallpaper Wallpaper is a Wallpaper and ringtone Application which allows user to set and download Wallpaper or ringtone. Account Activity Home Fragmen

Shubhanshu Sharma 5 Dec 6, 2022
Android app that show the palette of material theme based on your wallpaper

Material-You-Palette Android app that show the palette of material theme based on your wallpaper Show color blocks and names in on color Few Samples W

Yogesh Choudhary Paliyal 7 Oct 5, 2022
🎨 A color picker for Android. Pick a color using color wheel and slider (HSV & alpha).

ColorPicker English | 中文 A ColorPicker for Android. Pick a color using color wheel and slider (HSV & alpha). Gradle dependencies { implementation

Hong Duan 313 Dec 14, 2022
Utility Android app for generating color palettes of images using the Palette library. Written in Kotlin.

Palette Helper is a simple utility app made to generate color palettes of images using Google's fantastic Palette library. It's mostly a for-fun pet p

Zac Sweers 154 Nov 18, 2022
Utility Android app for generating color palettes of images using the Palette library. Written in Kotlin.

Palette Helper is a simple utility app made to generate color palettes of images using Google's fantastic Palette library. It's mostly a for-fun pet p

Zac Sweers 154 Nov 18, 2022
Wallpaper Battle A combined online and local HD wallpaper file manager

Resplash Resplash is powered by Unsplash.com The internet’s source of freely-usable images. Powered by creators everywhere. Browse 1M+ high-res photos

null 1 Oct 19, 2021