T8
T8RIN/DynamicTheme
๐จ Jetpack Compose material theming library, which falls back onto a custom dynamic colors implementation based on wallpapers to support older API levels.
DynamicTheme
๐จ Jetpack Compose material theming library, which falls back onto a custom dynamic colors implementation based on wallpapers to support older API levels. Yes! Dynamic colors are now available even on old android devices, enjoy!
Examples (See ImageResizer)
Attention: ColorPicker not included in the package
Features
- Declaring custom color scheme based on up to three colors
- Content based colorscheme by providing bitmap
- Dynamic themeing from android 5
- Amoled mode support
- Flexible api to retrieve secondary and tertiary colors from given primary color
- Animating color scheme changes
๐ฅ๐ฅ๐ฅ๐ฅ๐ฅ๐ฅ๐ฅ๐ฅ๐ฅ๐ฅ๐ฅ๐ฅ๐ฅ๐ฅ
Usage
1. Add dependencies
Kotlin (kts)
repositories {
maven { setUrl("https://jitpack.io") } // Add jitpack
}
dependencies {
implementation("com.github.t8rin:dynamictheme:LATEST_VERSION") // Replace "LATEST_VERSION" with preferrend version tag
}Groovy
repositories {
maven { url 'https://jitpack.io' } // Add jitpack
}
dependencies {
implementation 'com.github.t8rin:dynamictheme:LATEST_VERSION' // Replace "LATEST_VERSION" with preferrend version tag
}2. Add DynamicTheme call
@Composable
fun DynamicThemeComposable() {
DynamicTheme(
state = rememberDynamicThemeState(),
defaultColorTuple = ColorTuple(
primary = /*your value*/,
secondary = /*your value (optional)*/,
tertiary = /*your value (optional)*/
),
content = {
/*your content
* there you can get you provided state value by LocalDynamicThemeState.current
*/
}
)
//...
// Also you can use ColorTupleItem to get represenation of your color scheme by three colorsRoadmap
- Rewrite to Kotlin
Find this repository useful? โค๏ธ
Support it by joining stargazers for this repository. โญ
And follow me for my next creations! ๐คฉ
License
Designed and developed by 2023 T8RIN
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.On this page
Languages
Kotlin80.5%Java19.5%
Contributors
Apache License 2.0
Created April 1, 2023
Updated March 1, 2026


