@@ -9,8 +9,8 @@ import androidx.compose.ui.graphics.Color
99/* *
1010 * The default color scheme for the Miuix components.
1111 *
12- * @param primary The primary color.Cases:Switch, Button, Slider
13- * @param onPrimary The color of the text on primary color.Cases:Switch, Button, Slider
12+ * @param primary The primary color. Cases: Switch, Button, Slider.
13+ * @param onPrimary The color of the text on primary color. Cases: Switch, Button, Slider.
1414 * @param primaryVariant The variant color of the primary color.Cases:Card
1515 * @param onPrimaryVariant The color of the text on primary variant color.
1616 * @param disabledPrimary The disabled primary color of the switch.
@@ -54,6 +54,7 @@ import androidx.compose.ui.graphics.Color
5454 * @param onSurfaceContainerHigh The color of the text on surface container high color.
5555 * @param surfaceContainerHighest The container color of the surface color.
5656 * @param onSurfaceContainerHighest The color of the text on surface container highest color.
57+ * @param windowDimming The color of the window dimming. Cases: Dialog, Dropdown.
5758 */
5859@Stable
5960class MiuixColor (
@@ -102,6 +103,7 @@ class MiuixColor(
102103 onSurfaceContainerHigh : Color ,
103104 surfaceContainerHighest : Color ,
104105 onSurfaceContainerHighest : Color ,
106+ windowDimming : Color
105107) {
106108 val primary by mutableStateOf(primary, structuralEqualityPolicy())
107109 val onPrimary by mutableStateOf(onPrimary, structuralEqualityPolicy())
@@ -148,6 +150,7 @@ class MiuixColor(
148150 val onSurfaceContainerHigh by mutableStateOf(onSurfaceContainerHigh, structuralEqualityPolicy())
149151 val surfaceContainerHighest by mutableStateOf(surfaceContainerHighest, structuralEqualityPolicy())
150152 val onSurfaceContainerHighest by mutableStateOf(onSurfaceContainerHighest, structuralEqualityPolicy())
153+ val windowDimming by mutableStateOf(windowDimming, structuralEqualityPolicy())
151154}
152155
153156fun lightColorScheme () = MiuixColor (
@@ -195,7 +198,8 @@ fun lightColorScheme() = MiuixColor(
195198 surfaceContainerHigh = Color (0xFFEDEDED ),
196199 onSurfaceContainerHigh = Color (0xFFA5A5A5 ),
197200 surfaceContainerHighest = Color (0xFFE8E8E8 ),
198- onSurfaceContainerHighest = Color .Black
201+ onSurfaceContainerHighest = Color .Black ,
202+ windowDimming = Color .Black .copy(alpha = 0.3f )
199203)
200204
201205fun darkColorScheme () = MiuixColor (
@@ -243,5 +247,6 @@ fun darkColorScheme() = MiuixColor(
243247 surfaceContainerHigh = Color (0xFF2D2D2D ),
244248 onSurfaceContainerHigh = Color (0xFF6C6C6C ),
245249 surfaceContainerHighest = Color (0xFF2D2D2D ),
246- onSurfaceContainerHighest = Color (0xFFE9E9E9 )
250+ onSurfaceContainerHighest = Color (0xFFE9E9E9 ),
251+ windowDimming = Color .Black .copy(alpha = 0.6f )
247252)
0 commit comments