Skip to content
Ghimpu Lucian Eduard edited this page May 25, 2022 · 3 revisions

🎨 Everli Colors

Standalone colors are plain constants that be used anywhere.

Screenshot 2022-05-25 at 23 44 57

Compose

All colors are Compose Color accessible via the EverliColors object:

@Composable
fun SomeText() {
  Text(
    text = "Hello",
    color = EverliColors.Black100,
  )
}

XML

All colors are normal resources stored in colors.xml

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Hello"
    android:textColor="@color/black_100" />

EverliColor Enum

EverliColor is a utility class supposed to be used in your data layer if needed. It can be helpful when your backend provides it in data objects.

🔧 Utilities

EverliColor.fromString() -> used to handle deserialization.

EverliColor.toColor() -> used to convert to Compose Color.

EverliColor.toResourceId() -> used to convert to XML resource id.

Clone this wiki locally