# How to change themes programmatically in Jetpack Compose

DevFeed: [How to change themes programmatically in Jetpack Compose](<https://devfeed.tech/articles/how-to-change-themes-programmatically-in-jetpack-compose-28444.md>)

Original publisher: [Read original article](<https://composables.com/blog/change-themes>)

Author: Alex Styl

Published: 2023-03-30T00:00:00Z

Content type: tutorial

Language: en

Sources: [Composables - Concise, no-fluff video tutorials for Android developers](<https://devfeed.tech/sources/composables-concise-no-fluff-video-tutorials-for-android-developers.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Compose](<https://devfeed.tech/topics/compose.md>), [Dark Mode](<https://devfeed.tech/topics/dark-mode.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android Studio](<https://devfeed.tech/topics/android-studio.md>)

Tags: [android-studio](<https://devfeed.tech/tags/android-studio.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [themes](<https://devfeed.tech/tags/themes.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>), [ui](<https://devfeed.tech/tags/ui.md>)

## AI overview

A tutorial on changing light and dark themes programmatically in Jetpack Compose. It explains using the system theme preference or an explicit isDarkTheme value, and shows how to add a light, dark, or system-following user setting. The selected theme should be persisted with SharedPreferences or DataStore.

## Source excerpt

As easy as 1..2..3