diff --git a/packages/core/color/color-common.ts b/packages/core/color/color-common.ts index 9b82c1edb..ffece161e 100644 --- a/packages/core/color/color-common.ts +++ b/packages/core/color/color-common.ts @@ -100,7 +100,7 @@ export class Color implements definition.Color { } let intVal = parseInt(hex, 16); - if (length === 6) { + if (hex.length === 6) { // add the alpha component since the provided string is RRGGBB intVal = (intVal & 0x00ffffff) + 0xff000000; }