Skip to content

Commit

Permalink
import updated Material 3 Theme colors
Browse files Browse the repository at this point in the history
  • Loading branch information
frett committed Sep 5, 2024
1 parent f9b8667 commit 480df1a
Show file tree
Hide file tree
Showing 2 changed files with 156 additions and 33 deletions.
82 changes: 82 additions & 0 deletions ui/base/src/main/kotlin/org/cru/godtools/base/ui/theme/Color.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
package org.cru.godtools.base.ui.theme

import androidx.compose.ui.graphics.Color

// The following colors were automatically generated using the material 3 theme builder:
// https://m3.material.io/theme-builder#/custom
// Primary: #3BA4DB
// Secondary: #3BA4DB
// Neutral: #8F9193
// Color match: false

internal val primaryLight = Color(0xFF216487)
internal val onPrimaryLight = Color(0xFFFFFFFF)
internal val primaryContainerLight = Color(0xFFC7E7FF)
internal val onPrimaryContainerLight = Color(0xFF001E2E)
internal val secondaryLight = Color(0xFF216487)
internal val onSecondaryLight = Color(0xFFFFFFFF)
internal val secondaryContainerLight = Color(0xFFC7E7FF)
internal val onSecondaryContainerLight = Color(0xFF001E2E)
internal val tertiaryLight = Color(0xFF62597C)
internal val onTertiaryLight = Color(0xFFFFFFFF)
internal val tertiaryContainerLight = Color(0xFFE8DDFF)
internal val onTertiaryContainerLight = Color(0xFF1E1635)
internal val errorLight = Color(0xFFBA1A1A)
internal val onErrorLight = Color(0xFFFFFFFF)
internal val errorContainerLight = Color(0xFFFFDAD6)
internal val onErrorContainerLight = Color(0xFF410002)
internal val backgroundLight = Color(0xFFF6FAFE)
internal val onBackgroundLight = Color(0xFF181C20)
internal val surfaceLight = Color(0xFFF6FAFE)
internal val onSurfaceLight = Color(0xFF171C1F)
internal val surfaceVariantLight = Color(0xFFDDE3EA)
internal val onSurfaceVariantLight = Color(0xFF41484D)
internal val outlineLight = Color(0xFF71787E)
internal val outlineVariantLight = Color(0xFFC1C7CE)
internal val scrimLight = Color(0xFF000000)
internal val inverseSurfaceLight = Color(0xFF2C3134)
internal val inverseOnSurfaceLight = Color(0xFFEDF1F5)
internal val inversePrimaryLight = Color(0xFF92CEF5)
internal val surfaceDimLight = Color(0xFFD6DBDE)
internal val surfaceBrightLight = Color(0xFFF6FAFE)
internal val surfaceContainerLowestLight = Color(0xFFFFFFFF)
internal val surfaceContainerLowLight = Color(0xFFF0F4F8)
internal val surfaceContainerLight = Color(0xFFEAEEF2)
internal val surfaceContainerHighLight = Color(0xFFE4E9EC)
internal val surfaceContainerHighestLight = Color(0xFFDFE3E7)

internal val primaryDark = Color(0xFF92CEF5)
internal val onPrimaryDark = Color(0xFF00344C)
internal val primaryContainerDark = Color(0xFF004C6C)
internal val onPrimaryContainerDark = Color(0xFFC7E7FF)
internal val secondaryDark = Color(0xFF92CEF5)
internal val onSecondaryDark = Color(0xFF00344C)
internal val secondaryContainerDark = Color(0xFF004C6C)
internal val onSecondaryContainerDark = Color(0xFFC7E7FF)
internal val tertiaryDark = Color(0xFFCCC1E9)
internal val onTertiaryDark = Color(0xFF342B4B)
internal val tertiaryContainerDark = Color(0xFF4A4263)
internal val onTertiaryContainerDark = Color(0xFFE8DDFF)
internal val errorDark = Color(0xFFFFB4AB)
internal val onErrorDark = Color(0xFF690005)
internal val errorContainerDark = Color(0xFF93000A)
internal val onErrorContainerDark = Color(0xFFFFDAD6)
internal val backgroundDark = Color(0xFF101417)
internal val onBackgroundDark = Color(0xFFDFE3E7)
internal val surfaceDark = Color(0xFF0F1417)
internal val onSurfaceDark = Color(0xFFDFE3E7)
internal val surfaceVariantDark = Color(0xFF41484D)
internal val onSurfaceVariantDark = Color(0xFFC1C7CE)
internal val outlineDark = Color(0xFF8B9198)
internal val outlineVariantDark = Color(0xFF41484D)
internal val scrimDark = Color(0xFF000000)
internal val inverseSurfaceDark = Color(0xFFDFE3E7)
internal val inverseOnSurfaceDark = Color(0xFF2C3134)
internal val inversePrimaryDark = Color(0xFF216487)
internal val surfaceDimDark = Color(0xFF0F1417)
internal val surfaceBrightDark = Color(0xFF353A3D)
internal val surfaceContainerLowestDark = Color(0xFF0A0F12)
internal val surfaceContainerLowDark = Color(0xFF171C1F)
internal val surfaceContainerDark = Color(0xFF1B2023)
internal val surfaceContainerHighDark = Color(0xFF262B2E)
internal val surfaceContainerHighestDark = Color(0xFF303538)
Original file line number Diff line number Diff line change
Expand Up @@ -37,42 +37,83 @@ object GodToolsTheme {
// HACK: We are currently disabling surface tint to avoid using tonal elevation on surfaces.
// When we transition to using tonal elevation we can revert this back to the default value
surfaceTint = Color.White,
// The following colors were automatically generated using the material 3 theme builder:
// https://m3.material.io/theme-builder#/custom
// Primary: #3ba4db
// Secondary: #3ba4db
// Neutral: #8f9193
primaryContainer = Color(0xffc7e7ff),
onPrimaryContainer = Color(0xff001e2e),
secondary = Color(0xff00658e),
onSecondary = Color(0xffffffff),
secondaryContainer = Color(0xffc7e7ff),
onSecondaryContainer = Color(0xff001e2e),
background = Color(0xfffcfcff),
surface = Color(0xfffcfcff),
surfaceVariant = Color(0xffdde3ea),
onSurfaceVariant = Color(0xff41484d),
outline = Color(0xff71787e),
// HACK: This sets the surfaceTint to what should be the primary color.
// surfaceTint = Color(0xff00658e),

// These are the generated colors for the light theme, any manually overridden values are commented out
// primary = primaryLight,
onPrimary = onPrimaryLight,
primaryContainer = primaryContainerLight,
onPrimaryContainer = onPrimaryContainerLight,
secondary = secondaryLight,
onSecondary = onSecondaryLight,
secondaryContainer = secondaryContainerLight,
onSecondaryContainer = onSecondaryContainerLight,
// HACK: we don't currently define a tertiary color, so we will just use the default colors
// tertiary = tertiaryLight,
// onTertiary = onTertiaryLight,
// tertiaryContainer = tertiaryContainerLight,
// onTertiaryContainer = onTertiaryContainerLight,
error = errorLight,
onError = onErrorLight,
errorContainer = errorContainerLight,
onErrorContainer = onErrorContainerLight,
background = backgroundLight,
// onBackground = onBackgroundLight,
surface = surfaceLight,
// onSurface = onSurfaceLight,
surfaceVariant = surfaceVariantLight,
onSurfaceVariant = onSurfaceVariantLight,
outline = outlineLight,
outlineVariant = outlineVariantLight,
scrim = scrimLight,
inverseSurface = inverseSurfaceLight,
inverseOnSurface = inverseOnSurfaceLight,
inversePrimary = inversePrimaryLight,
surfaceDim = surfaceDimLight,
surfaceBright = surfaceBrightLight,
surfaceContainerLowest = surfaceContainerLowestLight,
surfaceContainerLow = surfaceContainerLowLight,
surfaceContainer = surfaceContainerLight,
surfaceContainerHigh = surfaceContainerHighLight,
surfaceContainerHighest = surfaceContainerHighestLight,
)

internal val darkColorScheme = darkColorScheme(
primary = Color(0xff83cfff),
onPrimary = Color(0xff00344c),
primaryContainer = Color(0xff004c6c),
onPrimaryContainer = Color(0xffc7e7ff),
secondary = Color(0xff83cfff),
onSecondary = Color(0xff00344c),
secondaryContainer = Color(0xff004c6c),
onSecondaryContainer = Color(0xffc7e7ff),
background = Color(0xff191c1e),
onBackground = Color(0xffe2e2e5),
surface = Color(0xff191c1e),
onSurface = Color(0xffe2e2e5),
surfaceVariant = Color(0xff41484d),
onSurfaceVariant = Color(0xffc1c7ce),
outline = Color(0xff8b9198)
primary = primaryDark,
onPrimary = onPrimaryDark,
primaryContainer = primaryContainerDark,
onPrimaryContainer = onPrimaryContainerDark,
secondary = secondaryDark,
onSecondary = onSecondaryDark,
secondaryContainer = secondaryContainerDark,
onSecondaryContainer = onSecondaryContainerDark,
// HACK: we don't currently define a tertiary color, so we will just use the default colors
// tertiary = tertiaryDark,
// onTertiary = onTertiaryDark,
// tertiaryContainer = tertiaryContainerDark,
// onTertiaryContainer = onTertiaryContainerDark,
error = errorDark,
onError = onErrorDark,
errorContainer = errorContainerDark,
onErrorContainer = onErrorContainerDark,
background = backgroundDark,
onBackground = onBackgroundDark,
surface = surfaceDark,
onSurface = onSurfaceDark,
surfaceVariant = surfaceVariantDark,
onSurfaceVariant = onSurfaceVariantDark,
outline = outlineDark,
outlineVariant = outlineVariantDark,
scrim = scrimDark,
inverseSurface = inverseSurfaceDark,
inverseOnSurface = inverseOnSurfaceDark,
inversePrimary = inversePrimaryDark,
surfaceDim = surfaceDimDark,
surfaceBright = surfaceBrightDark,
surfaceContainerLowest = surfaceContainerLowestDark,
surfaceContainerLow = surfaceContainerLowDark,
surfaceContainer = surfaceContainerDark,
surfaceContainerHigh = surfaceContainerHighDark,
surfaceContainerHighest = surfaceContainerHighestDark,
)

internal val typography = Typography().run {
Expand Down

0 comments on commit 480df1a

Please sign in to comment.