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
 | 
			
		||||
 | 
			
		||||
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.toArgb
 | 
			
		||||
import androidx.core.graphics.ColorUtils
 | 
			
		||||
| 
						 | 
				
			
			@ -10,6 +12,7 @@ import androidx.core.graphics.ColorUtils
 | 
			
		|||
// Use colours by calling (for example)
 | 
			
		||||
// ColorPalette.HIGH_EMPHASIS.onPrimary
 | 
			
		||||
 | 
			
		||||
// TODO Delete this class as we are now using ui.theme.Theme
 | 
			
		||||
class ColorPalette {
 | 
			
		||||
    companion object {
 | 
			
		||||
        // 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
 | 
			
		||||
 | 
			
		||||
val Purple200 = Color(0xFFBB86FC)
 | 
			
		||||
val Purple500 = Color(0xFF6200EE)
 | 
			
		||||
val Purple700 = Color(0xFF3700B3)
 | 
			
		||||
val Teal200 = Color(0xFF03DAC5)
 | 
			
		||||
val Blue100   = Color( 30, 100, 200, 255)
 | 
			
		||||
val Blue120   = Color( 27,  90, 180, 255)
 | 
			
		||||
val Yellow100 = Color(255, 210,   0, 255)
 | 
			
		||||
| 
						 | 
				
			
			@ -5,17 +5,20 @@ import androidx.compose.material.MaterialTheme
 | 
			
		|||
import androidx.compose.material.darkColors
 | 
			
		||||
import androidx.compose.material.lightColors
 | 
			
		||||
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(
 | 
			
		||||
    primary = Purple200,
 | 
			
		||||
    primaryVariant = Purple700,
 | 
			
		||||
    secondary = Teal200
 | 
			
		||||
    primary = Blue100,
 | 
			
		||||
    primaryVariant = Blue120,
 | 
			
		||||
    secondary = Yellow100
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
private val LightColorPalette = lightColors(
 | 
			
		||||
    primary = Purple500,
 | 
			
		||||
    primaryVariant = Purple700,
 | 
			
		||||
    secondary = Teal200
 | 
			
		||||
    primary = Blue100,
 | 
			
		||||
    primaryVariant = Blue120,
 | 
			
		||||
    secondary = Yellow100
 | 
			
		||||
 | 
			
		||||
    /* Other default colors to override
 | 
			
		||||
    background = Color.White,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue