Adding documentation on the theme util color vals

This commit is contained in:
Jays2Kings 2021-04-14 01:03:19 -04:00
parent d8bb6afaee
commit 9cde6a5eaa

View File

@ -142,6 +142,7 @@ object ThemeUtil {
) )
} }
/** Complies with textColorPrimary (probably night) */
@ColorInt @ColorInt
val lightPrimaryText: Int = Color.parseColor( val lightPrimaryText: Int = Color.parseColor(
when (styleRes) { when (styleRes) {
@ -150,15 +151,19 @@ object ThemeUtil {
} }
) )
/** Complies with textColorPrimary (probably night) */
@ColorInt @ColorInt
val darkPrimaryText: Int = Color.parseColor("#FFFFFFFF") val darkPrimaryText: Int = Color.parseColor("#FFFFFFFF")
/** Complies with textColorSecondary (primary with alpha) */
@ColorInt @ColorInt
val lightSecondaryText: Int = ColorUtils.setAlphaComponent(lightPrimaryText, (0.54f * 255f).roundToInt()) val lightSecondaryText: Int = ColorUtils.setAlphaComponent(lightPrimaryText, (0.54f * 255f).roundToInt())
/** Complies with textColorSecondary (primary with alpha) */
@ColorInt @ColorInt
val darkSecondaryText: Int = ColorUtils.setAlphaComponent(darkPrimaryText, (0.54f * 255f).roundToInt()) val darkSecondaryText: Int = ColorUtils.setAlphaComponent(darkPrimaryText, (0.54f * 255f).roundToInt())
/** Complies with colorBackground */
@ColorInt @ColorInt
val lightBackground: Int = Color.parseColor( val lightBackground: Int = Color.parseColor(
when (styleRes) { when (styleRes) {
@ -167,6 +172,7 @@ object ThemeUtil {
} }
) )
/** Complies with colorBackground (probably night) */
@ColorInt @ColorInt
val darkBackground: Int = Color.parseColor( val darkBackground: Int = Color.parseColor(
when (styleRes) { when (styleRes) {
@ -177,6 +183,7 @@ object ThemeUtil {
} }
) )
/** Complies with colorAccent */
@ColorInt @ColorInt
val lightAccent: Int = Color.parseColor( val lightAccent: Int = Color.parseColor(
when (styleRes) { when (styleRes) {
@ -185,6 +192,7 @@ object ThemeUtil {
} }
) )
/** Complies with colorAccent (probably night) */
@ColorInt @ColorInt
val darkAccent: Int = Color.parseColor( val darkAccent: Int = Color.parseColor(
when (styleRes) { when (styleRes) {
@ -196,18 +204,21 @@ object ThemeUtil {
} }
) )
/** Complies with colorSecondary */
@ColorInt @ColorInt
val lightAppBar: Int = when (styleRes) { val lightAppBar: Int = when (styleRes) {
R.style.Theme_Tachiyomi_AllBlue -> Color.parseColor("#54759E") R.style.Theme_Tachiyomi_AllBlue -> Color.parseColor("#54759E")
else -> lightBackground else -> lightBackground
} }
/** Complies with colorSecondary (probably night) */
@ColorInt @ColorInt
val darkAppBar: Int = when (styleRes) { val darkAppBar: Int = when (styleRes) {
R.style.Theme_Tachiyomi_AllBlue -> Color.parseColor("#54759E") R.style.Theme_Tachiyomi_AllBlue -> Color.parseColor("#54759E")
else -> darkBackground else -> darkBackground
} }
/** Complies with actionBarTintColor */
@ColorInt @ColorInt
val lightAppBarText: Int = when (styleRes) { val lightAppBarText: Int = when (styleRes) {
R.style.Theme_Tachiyomi_AllBlue -> Color.parseColor("#FFFFFF") R.style.Theme_Tachiyomi_AllBlue -> Color.parseColor("#FFFFFF")
@ -215,12 +226,14 @@ object ThemeUtil {
else -> lightPrimaryText else -> lightPrimaryText
} }
/** Complies with actionBarTintColor (probably night) */
@ColorInt @ColorInt
val darkAppBarText: Int = when (styleRes) { val darkAppBarText: Int = when (styleRes) {
R.style.Theme_Tachiyomi_AllBlue -> Color.parseColor("#FFFFFF") R.style.Theme_Tachiyomi_AllBlue -> Color.parseColor("#FFFFFF")
else -> darkPrimaryText else -> darkPrimaryText
} }
/** Complies with colorPrimaryVariant */
@ColorInt @ColorInt
val lightBottomBar: Int = Color.parseColor( val lightBottomBar: Int = Color.parseColor(
when (styleRes) { when (styleRes) {
@ -230,6 +243,7 @@ object ThemeUtil {
} }
) )
/** Complies with colorPrimaryVariant (probably night) */
@ColorInt @ColorInt
val darkBottomBar: Int = Color.parseColor( val darkBottomBar: Int = Color.parseColor(
when (styleRes) { when (styleRes) {
@ -241,24 +255,28 @@ object ThemeUtil {
} }
) )
/** Complies with tabBarIconInactive */
@ColorInt @ColorInt
val lightInactiveTab: Int = when (styleRes) { val lightInactiveTab: Int = when (styleRes) {
R.style.Theme_Tachiyomi_AllBlue -> Color.parseColor("#80FFFFFF") R.style.Theme_Tachiyomi_AllBlue -> Color.parseColor("#80FFFFFF")
else -> Color.parseColor("#C2424242") else -> Color.parseColor("#C2424242")
} }
/** Complies with tabBarIconInactive (probably night) */
@ColorInt @ColorInt
val darkInactiveTab: Int = when (styleRes) { val darkInactiveTab: Int = when (styleRes) {
R.style.Theme_Tachiyomi_AllBlue -> Color.parseColor("#80FFFFFF") R.style.Theme_Tachiyomi_AllBlue -> Color.parseColor("#80FFFFFF")
else -> Color.parseColor("#C2FFFFFF") else -> Color.parseColor("#C2FFFFFF")
} }
/** Complies with tabBarIconColor */
@ColorInt @ColorInt
val lightActiveTab: Int = when (styleRes) { val lightActiveTab: Int = when (styleRes) {
R.style.Theme_Tachiyomi_AllBlue -> lightAppBarText R.style.Theme_Tachiyomi_AllBlue -> lightAppBarText
else -> lightAccent else -> lightAccent
} }
/** Complies with tabBarIconColor (probably night) */
@ColorInt @ColorInt
val darkActiveTab: Int = when (styleRes) { val darkActiveTab: Int = when (styleRes) {
R.style.Theme_Tachiyomi_AllBlue -> darkAppBarText R.style.Theme_Tachiyomi_AllBlue -> darkAppBarText