Skip to content

Instantly share code, notes, and snippets.

@pablobaldez
Created April 22, 2021 15:57
Show Gist options
  • Save pablobaldez/8b2f7c20c7ce6fc71ce1ba3f405399e2 to your computer and use it in GitHub Desktop.
Save pablobaldez/8b2f7c20c7ce6fc71ce1ba3f405399e2 to your computer and use it in GitHub Desktop.
ColorSchema
data class ColorSchema(
val context: ColorContext,
val text: ColorText,
val background: ColorBackground,
val divider: ColorDivider,
val element: ColorElement,
val base: ColorBase,
val status: ColorStatus,
val monetary: ColorMonetary,
val progress: ColorProgress,
val asset: ColorAsset,
val benchmark: ColorBenchmark,
val feature: ColorFeature,
val isLight: Boolean
) {
internal companion object : Group<ColorSchema> {
override val light: ColorSchema = ColorSchema(
context = Neutral.light,
text = ColorText.light,
background = ColorBackground.light,
divider = ColorDivider.light,
element = ColorElement.light,
base = ColorBase.light,
status = ColorStatus.light,
monetary = ColorMonetary.light,
progress = ColorProgress.light,
asset = ColorAsset.light,
benchmark = ColorBenchmark.light,
feature = ColorFeature.light,
isLight = true
)
override val dark: ColorSchema = ColorSchema(
context = Neutral.dark,
text = ColorText.dark,
background = ColorBackground.dark,
divider = ColorDivider.dark,
element = ColorElement.dark,
base = ColorBase.dark,
status = ColorStatus.dark,
monetary = ColorMonetary.dark,
progress = ColorProgress.dark,
asset = ColorAsset.dark,
benchmark = ColorBenchmark.dark,
feature = ColorFeature.dark,
isLight = false
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment