MiuixColors class
Miuix 颜色方案。对应 Kotlin 端的 top.yukonga.miuix.kmp.theme.Colors。
所有颜色均可通过 copy 覆盖。默认浅色/深色值由 lightColorScheme / darkColorScheme 工厂提供,与 HyperOS 规范一致。
- Annotations
Constructors
- MiuixColors({required Color primary, required Color onPrimary, required Color primaryVariant, required Color onPrimaryVariant, required Color error, required Color onError, required Color errorContainer, required Color onErrorContainer, required Color disabledPrimary, required Color disabledOnPrimary, required Color disabledPrimaryButton, required Color disabledOnPrimaryButton, required Color disabledPrimarySlider, required Color primaryContainer, required Color onPrimaryContainer, required Color secondary, required Color onSecondary, required Color secondaryVariant, required Color onSecondaryVariant, required Color disabledSecondary, required Color disabledOnSecondary, required Color disabledSecondaryVariant, required Color disabledOnSecondaryVariant, required Color secondaryContainer, required Color onSecondaryContainer, required Color secondaryContainerVariant, required Color onSecondaryContainerVariant, required Color tertiaryContainer, required Color onTertiaryContainer, required Color tertiaryContainerVariant, required Color background, required Color onBackground, required Color onBackgroundVariant, required Color surface, required Color onSurface, required Color surfaceVariant, required Color onSurfaceSecondary, required Color onSurfaceVariantSummary, required Color onSurfaceVariantActions, required Color disabledOnSurface, required Color surfaceContainer, required Color onSurfaceContainer, required Color onSurfaceContainerVariant, required Color surfaceContainerHigh, required Color onSurfaceContainerHigh, required Color surfaceContainerHighest, required Color onSurfaceContainerHighest, required Color outline, required Color dividerLine, required Color windowDimming, required Color sliderKeyPoint, required Color sliderKeyPointForeground, required Color sliderBackground})
-
const
Properties
- background → Color
-
应用背景色。
final
- disabledOnPrimary → Color
-
Switch 禁用主色上的文字颜色。
final
- disabledOnPrimaryButton → Color
-
Button 禁用主色上的文字颜色。
final
- disabledOnSecondary → Color
-
禁用次级色上的文字颜色。
final
- disabledOnSecondaryVariant → Color
-
禁用次级色变体上的文字颜色。
final
- disabledOnSurface → Color
-
禁用 Surface 上的文字颜色。
final
- disabledPrimary → Color
-
Switch 禁用时的主色。
final
- disabledPrimaryButton → Color
-
Button 禁用时的主色。
final
- disabledPrimarySlider → Color
-
Slider 禁用时的主色。
final
- disabledSecondary → Color
-
禁用次级色。
final
- disabledSecondaryVariant → Color
-
禁用次级色变体。
final
- dividerLine → Color
-
分隔线色。
final
- error → Color
-
错误色。
final
- errorContainer → Color
-
错误容器色。
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- onBackground → Color
-
背景上的文字颜色。
final
- onBackgroundVariant → Color
-
背景变体上的文字颜色。
final
- onError → Color
-
错误色上的文字颜色。
final
- onErrorContainer → Color
-
错误容器上的文字颜色。
final
- onPrimary → Color
-
主色上的文字颜色。
final
- onPrimaryContainer → Color
-
主色容器上的文字颜色。
final
- onPrimaryVariant → Color
-
主色变体上的文字颜色。
final
- onSecondary → Color
-
次级色上的文字颜色。
final
- onSecondaryContainer → Color
-
次级容器上的文字颜色。
final
- onSecondaryContainerVariant → Color
-
次级容器变体上的文字颜色。
final
- onSecondaryVariant → Color
-
次级色变体上的文字颜色。
final
- onSurface → Color
-
Surface 上的文字颜色。
final
- onSurfaceContainer → Color
-
Surface 容器上的文字颜色。
final
- onSurfaceContainerHigh → Color
-
高 Surface 容器上的文字颜色。
final
- onSurfaceContainerHighest → Color
-
最高 Surface 容器上的文字颜色。
final
- onSurfaceContainerVariant → Color
-
Surface 容器变体上的文字颜色。
final
- onSurfaceSecondary → Color
-
Surface 上的次级文字颜色。
final
- onSurfaceVariantActions → Color
-
Surface 变体上的操作文字颜色。
final
- onSurfaceVariantSummary → Color
-
Surface 变体上的摘要文字颜色。
final
- onTertiaryContainer → Color
-
三级容器上的文字颜色。
final
- outline → Color
-
描边/边框色。
final
- primary → Color
-
主色。用于 Switch / Button / Slider。
final
- primaryContainer → Color
-
主色容器色。
final
- primaryVariant → Color
-
主色变体。用于 Card。
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secondary → Color
-
次级色。
final
- secondaryContainer → Color
-
次级容器色。
final
- secondaryContainerVariant → Color
-
次级容器变体色。
final
- secondaryVariant → Color
-
次级色变体。
final
- sliderBackground → Color
-
Slider 背景色。
final
- sliderKeyPoint → Color
-
Slider 关键点色。
final
- sliderKeyPointForeground → Color
-
Slider 关键点前景色。
final
- surface → Color
-
Surface 色。
final
- surfaceContainer → Color
-
Surface 容器色。
final
- surfaceContainerHigh → Color
-
高 Surface 容器色。
final
- surfaceContainerHighest → Color
-
最高 Surface 容器色。
final
- surfaceVariant → Color
-
Surface 变体色。
final
- tertiaryContainer → Color
-
三级容器色。
final
- tertiaryContainerVariant → Color
-
三级容器变体色。
final
- windowDimming → Color
-
窗口遮罩色。用于 Dialog / Dropdown / Spinner / BottomSheet。
final
Methods
-
copy(
{Color? primary, Color? onPrimary, Color? primaryVariant, Color? onPrimaryVariant, Color? error, Color? onError, Color? errorContainer, Color? onErrorContainer, Color? disabledPrimary, Color? disabledOnPrimary, Color? disabledPrimaryButton, Color? disabledOnPrimaryButton, Color? disabledPrimarySlider, Color? primaryContainer, Color? onPrimaryContainer, Color? secondary, Color? onSecondary, Color? secondaryVariant, Color? onSecondaryVariant, Color? disabledSecondary, Color? disabledOnSecondary, Color? disabledSecondaryVariant, Color? disabledOnSecondaryVariant, Color? secondaryContainer, Color? onSecondaryContainer, Color? secondaryContainerVariant, Color? onSecondaryContainerVariant, Color? tertiaryContainer, Color? onTertiaryContainer, Color? tertiaryContainerVariant, Color? background, Color? onBackground, Color? onBackgroundVariant, Color? surface, Color? onSurface, Color? surfaceVariant, Color? onSurfaceSecondary, Color? onSurfaceVariantSummary, Color? onSurfaceVariantActions, Color? disabledOnSurface, Color? surfaceContainer, Color? onSurfaceContainer, Color? onSurfaceContainerVariant, Color? surfaceContainerHigh, Color? onSurfaceContainerHigh, Color? surfaceContainerHighest, Color? onSurfaceContainerHighest, Color? outline, Color? dividerLine, Color? windowDimming, Color? sliderKeyPoint, Color? sliderKeyPointForeground, Color? sliderBackground}) → MiuixColors - 复制并覆盖部分颜色。
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override