Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Compose theme colors #97

Merged
merged 1 commit into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
<resources>

<style name="Theme.ChatGPTAndroid" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="android:statusBarColor">@color/green_dark_theme</item>
<item name="android:statusBarColor">@color/stream_primary</item>
</style>
</resources>
23 changes: 8 additions & 15 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,19 @@
-->
<resources>
<!-- Colors to apply in layouts -->
<color name="colorPrimary">@color/green_darker</color>
<color name="colorPrimaryDark">@color/green_darkest</color>
<color name="colorPrimary">@color/stream_primary</color>
<color name="colorPrimaryDark">@color/stream_primary</color>
<color name="tab_active">@color/white</color>
<color name="tab_inactive">@color/green_light</color>
<color name="floating_message_create">@color/green</color>
<color name="tab_inactive">@color/stream_primary</color>
<color name="floating_message_create">@color/stream_primary</color>
<color name="channel_background">@color/off_white</color>
<color name="toolbar_background">@color/green_darker</color>
<color name="message_yours">@color/green_lightest</color>
<color name="toolbar_background">@color/stream_primary</color>
<color name="message_yours">@color/stream_primary</color>
<color name="message_theirs">@color/white</color>
<color name="message_input_button_inactive">@color/gray</color>
<color name="floating_message_send">@color/green_dark</color>
<color name="floating_message_send">@color/stream_primary</color>

<!-- Palette Greens -->
<color name="green_lightest">#FFE2C7FF</color>
<color name="green_light">#FFA97EB0</color>
<color name="green">#FFA430B8</color>
<color name="green_dark">#FFAE38C3</color>
<color name="green_darker">#FFAE38C3</color>
<color name="green_darkest">#FF981E9F</color>
<color name="green_dark_theme">#FF4D0057</color>
<color name="stream_primary">#FF005FFF</color>

<!-- White & Gray -->
<color name="white">#FFF</color>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
<resources>

<style name="Theme.ChatGPTAndroid" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="android:statusBarColor">@color/green_darker</item>
<item name="android:statusBarColor">@color/stream_primary</item>
</style>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import com.skydoves.chatgpt.core.designsystem.theme.PURPLE450
import com.skydoves.chatgpt.core.designsystem.theme.STREAM_PRIMARY

@Composable
fun BoxScope.ChatGPTLoadingIndicator() {
CircularProgressIndicator(
modifier = Modifier.align(Alignment.Center),
color = PURPLE450
color = STREAM_PRIMARY
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,8 @@ package com.skydoves.chatgpt.core.designsystem.theme

import androidx.compose.ui.graphics.Color

val PURPLE200 = Color(0xFFE2C7FF)
val PURPLE300 = Color(0xFFA97EB0)
val PURPLE450 = Color(0xFFA430B8)
val PURPLE500 = Color(0xFFAE38C3)
val PURPLE600 = Color(0xFF981E9F)
val PURPLE700 = Color(0xFF4D0057)

val DARK_PURPLE200 = Color(0xFF302336)
val DARK_PURPLE300 = Color(0xFF1F1025)

val STREAM_PRIMARY = Color(0xFF005FFF)
val STREAM_PRIMARY_LIGHT = Color(0x77528AE8)
val BACKGROUND900 = Color(0xFF212121)
val WHITE200 = Color(0xFFe0e0e0)
val BLACK200 = Color(0xFA212020)
val GRAY200 = Color(0xFF88898b)
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.graphics.Color

private val DarkChatGPTColorScheme = darkColorScheme(
primary = PURPLE700,
primaryContainer = DARK_PURPLE300,
secondary = PURPLE500,
background = DARK_PURPLE300,
primary = STREAM_PRIMARY,
primaryContainer = STREAM_PRIMARY,
secondary = STREAM_PRIMARY,
background = STREAM_PRIMARY,
tertiary = WHITE200,
onTertiary = GRAY200
)

private val LightChatGPTColorScheme = lightColorScheme(
primary = PURPLE500,
primaryContainer = PURPLE700,
secondary = PURPLE300,
primary = STREAM_PRIMARY,
primaryContainer = STREAM_PRIMARY,
secondary = STREAM_PRIMARY,
background = WHITE200,
tertiary = WHITE200,
onTertiary = GRAY200
Expand All @@ -46,7 +46,7 @@ private val LightChatGPTColorScheme = lightColorScheme(
private val LightAndroidBackgroundTheme = BackgroundTheme(color = Color.White)

/** Dark Android background theme */
private val DarkAndroidBackgroundTheme = BackgroundTheme(color = DARK_PURPLE300)
private val DarkAndroidBackgroundTheme = BackgroundTheme(color = BACKGROUND900)

@Composable
fun ChatGPTComposeTheme(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import androidx.hilt.navigation.compose.hiltViewModel
import com.skydoves.balloon.compose.Balloon
import com.skydoves.chatgpt.core.designsystem.component.ChatGPTLoadingIndicator
import com.skydoves.chatgpt.core.designsystem.composition.LocalOnFinishDispatcher
import com.skydoves.chatgpt.core.designsystem.theme.PURPLE600
import com.skydoves.chatgpt.core.designsystem.theme.STREAM_PRIMARY
import com.skydoves.chatgpt.core.navigation.AppComposeNavigator
import com.skydoves.chatgpt.core.navigation.ChatGPTScreens
import com.skydoves.chatgpt.feature.chat.R
Expand Down Expand Up @@ -101,7 +101,7 @@ fun ChatGPTChannels(

FloatingActionButton(
modifier = Modifier.matchParentSize(),
containerColor = PURPLE600,
containerColor = STREAM_PRIMARY,
shape = CircleShape,
onClick = { viewModel.handleEvents(GPTChannelEvent.CreateChannel) }
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import com.skydoves.balloon.BalloonSizeSpec
import com.skydoves.balloon.compose.rememberBalloonBuilder
import com.skydoves.balloon.compose.setBackgroundColor
import com.skydoves.balloon.compose.setTextColor
import com.skydoves.chatgpt.core.designsystem.theme.PURPLE500
import com.skydoves.chatgpt.core.designsystem.theme.STREAM_PRIMARY

@Composable
internal fun rememberFloatingBalloon() = rememberBalloonBuilder {
Expand All @@ -40,6 +40,6 @@ internal fun rememberFloatingBalloon() = rememberBalloonBuilder {
setTextSize(15f)
setCornerRadius(8f)
setTextColor(Color.White)
setBackgroundColor(PURPLE500)
setBackgroundColor(STREAM_PRIMARY)
setBalloonAnimation(BalloonAnimation.ELASTIC)
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ package com.skydoves.chatgpt.feature.chat.theme

import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.runtime.Composable
import com.skydoves.chatgpt.core.designsystem.theme.DARK_PURPLE300
import com.skydoves.chatgpt.core.designsystem.theme.PURPLE200
import com.skydoves.chatgpt.core.designsystem.theme.PURPLE450
import com.skydoves.chatgpt.core.designsystem.theme.PURPLE600
import com.skydoves.chatgpt.core.designsystem.theme.BACKGROUND900
import com.skydoves.chatgpt.core.designsystem.theme.STREAM_PRIMARY
import com.skydoves.chatgpt.core.designsystem.theme.STREAM_PRIMARY_LIGHT
import com.skydoves.chatgpt.feature.chat.reactions.ChatGPTReactionFactory
import io.getstream.chat.android.compose.ui.theme.ChatTheme
import io.getstream.chat.android.compose.ui.theme.StreamColors
Expand All @@ -33,14 +32,14 @@ fun ChatGPTStreamTheme(
) {
val streamColors = if (darkTheme) {
StreamColors.defaultDarkColors().copy(
appBackground = DARK_PURPLE300,
primaryAccent = PURPLE450,
ownMessagesBackground = PURPLE600
appBackground = BACKGROUND900,
primaryAccent = STREAM_PRIMARY,
ownMessagesBackground = STREAM_PRIMARY
)
} else {
StreamColors.defaultColors().copy(
primaryAccent = PURPLE450,
ownMessagesBackground = PURPLE200
primaryAccent = STREAM_PRIMARY,
ownMessagesBackground = STREAM_PRIMARY_LIGHT
)
}

Expand Down