diff --git a/packages/uui-color-picker/lib/uui-color-picker.element.ts b/packages/uui-color-picker/lib/uui-color-picker.element.ts index be29edd93..300d4e2e0 100644 --- a/packages/uui-color-picker/lib/uui-color-picker.element.ts +++ b/packages/uui-color-picker/lib/uui-color-picker.element.ts @@ -428,6 +428,9 @@ export class UUIColorPickerElement extends LabelMixin('label', LitElement) { } private _renderColorPicker() { + const previewColor = this.value + ? `hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha / 100})` + : 'transparent'; return html`
@@ -547,6 +546,9 @@ export class UUIColorPickerElement extends LabelMixin('label', LitElement) { } private _renderPreviewButton() { + const previewColor = this.value + ? `hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha / 100})` + : 'transparent'; return html`