Update colors, switch to native method
This commit is contained in:
parent
b8ca143b60
commit
b33a478704
3 changed files with 15 additions and 10 deletions
|
@ -1,6 +1,8 @@
|
||||||
package be.ugent.sel.studeez.common
|
package be.ugent.sel.studeez.common
|
||||||
|
|
||||||
import androidx.compose.material.Colors
|
import androidx.compose.material.Colors
|
||||||
|
import androidx.compose.material.MaterialTheme
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.graphics.toArgb
|
import androidx.compose.ui.graphics.toArgb
|
||||||
import androidx.core.graphics.ColorUtils
|
import androidx.core.graphics.ColorUtils
|
||||||
|
@ -10,6 +12,7 @@ import androidx.core.graphics.ColorUtils
|
||||||
// Use colours by calling (for example)
|
// Use colours by calling (for example)
|
||||||
// ColorPalette.HIGH_EMPHASIS.onPrimary
|
// ColorPalette.HIGH_EMPHASIS.onPrimary
|
||||||
|
|
||||||
|
// TODO Delete this class as we are now using ui.theme.Theme
|
||||||
class ColorPalette {
|
class ColorPalette {
|
||||||
companion object {
|
companion object {
|
||||||
// Use High emphasis colours if the thing is important.
|
// Use High emphasis colours if the thing is important.
|
||||||
|
|
|
@ -2,7 +2,6 @@ package be.ugent.sel.studeez.ui.theme
|
||||||
|
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
|
|
||||||
val Purple200 = Color(0xFFBB86FC)
|
val Blue100 = Color( 30, 100, 200, 255)
|
||||||
val Purple500 = Color(0xFF6200EE)
|
val Blue120 = Color( 27, 90, 180, 255)
|
||||||
val Purple700 = Color(0xFF3700B3)
|
val Yellow100 = Color(255, 210, 0, 255)
|
||||||
val Teal200 = Color(0xFF03DAC5)
|
|
|
@ -5,17 +5,20 @@ import androidx.compose.material.MaterialTheme
|
||||||
import androidx.compose.material.darkColors
|
import androidx.compose.material.darkColors
|
||||||
import androidx.compose.material.lightColors
|
import androidx.compose.material.lightColors
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
|
||||||
|
// Reference colour palette: https://xd.adobe.com/view/3cb1e6ff-eb42-4a74-886e-7739c2ccc5ed-69e2/
|
||||||
|
|
||||||
private val DarkColorPalette = darkColors(
|
private val DarkColorPalette = darkColors(
|
||||||
primary = Purple200,
|
primary = Blue100,
|
||||||
primaryVariant = Purple700,
|
primaryVariant = Blue120,
|
||||||
secondary = Teal200
|
secondary = Yellow100
|
||||||
)
|
)
|
||||||
|
|
||||||
private val LightColorPalette = lightColors(
|
private val LightColorPalette = lightColors(
|
||||||
primary = Purple500,
|
primary = Blue100,
|
||||||
primaryVariant = Purple700,
|
primaryVariant = Blue120,
|
||||||
secondary = Teal200
|
secondary = Yellow100
|
||||||
|
|
||||||
/* Other default colors to override
|
/* Other default colors to override
|
||||||
background = Color.White,
|
background = Color.White,
|
||||||
|
|
Reference in a new issue