I don't quite understand how to control the contrast of my colors. I have the following code but when I change the contrastLevel I end up with totally different colors
val scheme = SchemeTonalSpot(Hct.fromInt(jsonToColorTuple(defaultColorTuple.value).surface!!.toArgb()), isDark = dark.value, contrastLevel = defaultContrast.value.toDouble())
val colorTuple = ColorTuple(
primary = Color(scheme.primaryPalette.hashCode()),
secondary = Color(scheme.secondaryPalette.hashCode()),
tertiary = Color(scheme.tertiaryPalette.hashCode()),
surface = Color(scheme.neutralPalette.hashCode()),
)
val ColorTuples: MutableMap<String, ColorTuple> = mutableMapOf(
"Latte" to ColorTuple(
primary = Color(0xFFE0E3E7), // #E0E3E7 (Light Gray)
secondary = Color(0xFFF3BCE6), // #F3BCE6 (Pink)
tertiary = Color(0xFFC29DF1), // #C29DF1 (Purple)
surface = Color(0xFFFCFCFC) // #FCFCFC (White)
),
"Frappe" to ColorTuple(
primary = Color(0xFFE78284), // #E78284 (Pink)
secondary = Color(0xFFC6D0F5), // #C6D0F5 (Light Blue)
tertiary = Color(0xFFA6D189), // #A6D189 (Light Green)
surface = Color(0xFFFCFCFC) // #FCFCFC (White)
),
"Macchiato" to ColorTuple(
primary = Color(0xFF24273A), // #24273A (Dark Gray)
secondary = Color(0xFFF3BCE6), // #F3BCE6 (Pink) - Lighter for contrast
tertiary = Color(0xFFC29DF1), // #C29DF1 (Purple) - Lighter for contrast
surface = Color(0xFF1A1823) // #1A1823 (Black)
),
"Mocha" to ColorTuple(
primary = Color(0xFF131020), // #131020 (Black)
secondary = Color(0xFFE0E3E7), // #E0E3E7 (Light Gray) - Lighter for contrast
tertiary = Color(0xFFC29DF1), // #C29DF1 (Purple) - Lighter for contrast
surface = Color(0xFF24273A) // #24273A (Dark Gray)
)
)