Add illustration colors

This commit is contained in:
Patrick Honkonen
2025-02-24 16:44:51 -05:00
committed by David Perez
parent 7804d8430f
commit 60da236f3e
3 changed files with 24 additions and 10 deletions

View File

@@ -17,6 +17,7 @@ data class BitwardenColorScheme(
val toggleButton: ToggleButtonColors, val toggleButton: ToggleButtonColors,
val sliderButton: SliderButtonColors, val sliderButton: SliderButtonColors,
val status: StatusColors, val status: StatusColors,
val illustration: IllustrationColors,
) { ) {
/** /**
* Defines all the text colors for the app. * Defines all the text colors for the app.
@@ -64,8 +65,6 @@ data class BitwardenColorScheme(
val reversed: Color, val reversed: Color,
val badgeBackground: Color, val badgeBackground: Color,
val badgeForeground: Color, val badgeForeground: Color,
val faviconForeground: Color,
val faviconBackground: Color,
) )
/** /**
@@ -126,4 +125,13 @@ data class BitwardenColorScheme(
val weak2: Color, val weak2: Color,
val error: Color, val error: Color,
) )
/**
* Defines all the illustration colors for the app.
*/
@Immutable
data class IllustrationColors(
val outline: Color,
val backgroundPrimary: Color,
)
} }

View File

@@ -34,8 +34,6 @@ val darkBitwardenColorScheme: BitwardenColorScheme = BitwardenColorScheme(
reversed = PrimitiveColors.gray1100, reversed = PrimitiveColors.gray1100,
badgeBackground = PrimitiveColors.pink200, badgeBackground = PrimitiveColors.pink200,
badgeForeground = PrimitiveColors.gray1100, badgeForeground = PrimitiveColors.gray1100,
faviconForeground = PrimitiveColors.blue500,
faviconBackground = PrimitiveColors.blue200,
), ),
filledButton = BitwardenColorScheme.FilledButtonColors( filledButton = BitwardenColorScheme.FilledButtonColors(
background = PrimitiveColors.blue400, background = PrimitiveColors.blue400,
@@ -71,6 +69,10 @@ val darkBitwardenColorScheme: BitwardenColorScheme = BitwardenColorScheme(
weak2 = PrimitiveColors.yellow200, weak2 = PrimitiveColors.yellow200,
error = PrimitiveColors.red200, error = PrimitiveColors.red200,
), ),
illustration = BitwardenColorScheme.IllustrationColors(
outline = PrimitiveColors.blue500,
backgroundPrimary = PrimitiveColors.blue200,
),
) )
/** /**
@@ -104,8 +106,6 @@ val lightBitwardenColorScheme: BitwardenColorScheme = BitwardenColorScheme(
reversed = PrimitiveColors.gray100, reversed = PrimitiveColors.gray100,
badgeBackground = PrimitiveColors.pink100, badgeBackground = PrimitiveColors.pink100,
badgeForeground = PrimitiveColors.gray100, badgeForeground = PrimitiveColors.gray100,
faviconForeground = PrimitiveColors.blue700,
faviconBackground = PrimitiveColors.blue100,
), ),
filledButton = BitwardenColorScheme.FilledButtonColors( filledButton = BitwardenColorScheme.FilledButtonColors(
background = PrimitiveColors.blue500, background = PrimitiveColors.blue500,
@@ -141,6 +141,10 @@ val lightBitwardenColorScheme: BitwardenColorScheme = BitwardenColorScheme(
weak2 = PrimitiveColors.yellow300, weak2 = PrimitiveColors.yellow300,
error = PrimitiveColors.red300, error = PrimitiveColors.red300,
), ),
illustration = BitwardenColorScheme.IllustrationColors(
outline = PrimitiveColors.blue700,
backgroundPrimary = PrimitiveColors.blue100,
),
) )
/** /**
@@ -180,8 +184,6 @@ fun dynamicBitwardenColorScheme(
reversed = materialColorScheme.inversePrimary, reversed = materialColorScheme.inversePrimary,
badgeBackground = materialColorScheme.error, badgeBackground = materialColorScheme.error,
badgeForeground = materialColorScheme.onError, badgeForeground = materialColorScheme.onError,
faviconForeground = materialColorScheme.onTertiaryContainer,
faviconBackground = materialColorScheme.tertiaryContainer,
), ),
filledButton = BitwardenColorScheme.FilledButtonColors( filledButton = BitwardenColorScheme.FilledButtonColors(
background = materialColorScheme.primary, background = materialColorScheme.primary,
@@ -217,6 +219,10 @@ fun dynamicBitwardenColorScheme(
weak2 = defaultTheme.status.weak2, weak2 = defaultTheme.status.weak2,
error = defaultTheme.status.error, error = defaultTheme.status.error,
), ),
illustration = BitwardenColorScheme.IllustrationColors(
outline = materialColorScheme.tertiaryContainer,
backgroundPrimary = materialColorScheme.onTertiaryContainer,
),
) )
} }

View File

@@ -188,7 +188,7 @@ private fun ItemHeaderIcon(
modifier = if (iconData is IconData.Local) { modifier = if (iconData is IconData.Local) {
modifier.then( modifier.then(
Modifier.background( Modifier.background(
color = BitwardenTheme.colorScheme.icon.faviconBackground, color = BitwardenTheme.colorScheme.illustration.backgroundPrimary,
shape = BitwardenTheme.shapes.favicon, shape = BitwardenTheme.shapes.favicon,
), ),
) )
@@ -199,7 +199,7 @@ private fun ItemHeaderIcon(
BitwardenIcon( BitwardenIcon(
iconData = iconData, iconData = iconData,
contentDescription = null, contentDescription = null,
tint = BitwardenTheme.colorScheme.icon.faviconForeground, tint = BitwardenTheme.colorScheme.illustration.outline,
modifier = Modifier modifier = Modifier
.nullableTestTag(testTag), .nullableTestTag(testTag),
) )