{
- @Input()
- colorMode: ColorMode = ColorMode.HEX
-
constructor() {
super()
}
randomize() {
- const color = randomColor(this.colorMode)
- let colorHex = color
- if (this.colorMode == ColorMode.HSL) {
- const hsl = color.split(',')
- colorHex = hslToHex(+hsl[0], +hsl[1], +hsl[2])
- }
- this.value = colorHex
- this.onChange(color)
+ this.colorChanged(randomColor())
}
- sliderChanged(colorEvent:ColorEvent) {
- this.value = colorEvent.color.hex
- this.onChange(colorEvent.color[this.colorMode].toString())
+ colorChanged(value) {
+ this.value = value
+ this.onChange(value)
}
}
diff --git a/src-ui/src/app/components/manage/settings/settings.component.html b/src-ui/src/app/components/manage/settings/settings.component.html
index ac37547a6..dac266277 100644
--- a/src-ui/src/app/components/manage/settings/settings.component.html
+++ b/src-ui/src/app/components/manage/settings/settings.component.html
@@ -105,7 +105,7 @@
Theme Color