/ThemeUtils

Primary LanguageKotlinApache License 2.0Apache-2.0

ThemeUtils

What's This?

This was once a part of app-theme-helper.

This is used for Phonograph Plus.

I reorganized and refactor these codes, now this is just library to caculate theme color and handle view tint.

Besides, material-tools is an old version of this library.

Setup

dependencies {
    // color-util: calculate colors
    implementation("com.github.chr56.ThemeUtils:color-util:0.2.0")
    // materials-util: most material color values resource (non-kotlin)
    implementation("com.github.chr56.ThemeUtils:materials-util:0.2.0")
    // tint-util: tint the Views
    implementation("com.github.chr56.ThemeUtils:tint-util:0.2.0")

    // It is suggested to add Google material design library if you use tint-util
    implementation("com.google.android.material:material:1.9.0")
}

Original README digest

App Theme Helper

This is basically a copy of App Theme Engine by Aidan Follestad which only includes the "Config" part. This library is only for saving and querying theme values. The user is responsible to use those values ( applying to Views), unlike ATE this library won't automatically theme your views. As an extra this library includes a few Util methods from ATE and myself to make theming easy.