Android Matrix messenger application using the Matrix Rust Sdk and Jetpack Compose
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Benoit Marty 68f9c81628 Let the user choose theme (#1499) 10 months ago
..
src/main/kotlin/io/element/android/libraries/theme Let the user choose theme (#1499) 10 months ago
README.md
build.gradle.kts Upgrade compose-material3 to `1.2.0-alpha05` version (#1011) 1 year ago

README.md

Theme Module

This module contains the theme tokens for the application, including those auto-generated from Compound and its mappings.

Usage

The module contains public tokens and color schemes that are later used in MaterialTheme and added to ElementTheme for use in the application.

All tokens can be accessed through the ElementTheme object, which contains the following properties:

  • ElementTheme.materialColors: contains all Material color tokens. In Figma, they're prefixed with M3/. It's an alias to MaterialTheme.colorScheme.
  • ElementTheme.colors: contains all Compound semantic color tokens. In Figma, they're prefixed with either Light/ or Dark/.
  • ElementTheme.typography: contains the Compound TypographyTokens values. In Figma, they're prefixed with Android/font/.

Adding new tokens

All new tokens should come from Compound and added to the compound.generated package. To map the literal tokens to the semantic ones, you'll have to update both compoundColorsLight and compoundColorsDark in CompoundColors.kt.