Skip to content

Commit 80802ea

Browse files
committed
fix(led): wrong light color when color is uppercase
e.g. "Blue" vs "blue"
1 parent 637d111 commit 80802ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/led-element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class LEDElement extends LitElement {
5555

5656
render() {
5757
const { color, lightColor, flip } = this;
58-
const lightColorActual = lightColor || lightColors[color] || '#ff8080';
58+
const lightColorActual = lightColor || lightColors[color?.toLowerCase()] || '#ff8080';
5959
const opacity = this.brightness ? 0.3 + this.brightness * 0.7 : 0;
6060
const lightOn = this.value && this.brightness > Number.EPSILON;
6161
const xScale = flip ? -1 : 1;

0 commit comments

Comments
 (0)