We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b1288a commit 21a8293Copy full SHA for 21a8293
src/color/color.service.ts
@@ -41,7 +41,7 @@ export class ColorService {
41
this.renderer2.setStyle(this.elementRef.nativeElement, property, colors[color]);
42
} else {
43
this.renderer2.removeClass(this.elementRef.nativeElement, 'bg-color');
44
- if(color.startsWith('#') || color.startsWith('rgb')) {
+ if(color.indexOf('#') === 0 || color.indexOf('rgb') === 0) {
45
this.currentBackgroundStyle = {property: property, color: color};
46
this.renderer2.setStyle(this.elementRef.nativeElement, property, color);
47
} else if(colorsAliases.indexOf(color) !== -1) {
0 commit comments