diff --git a/src/api/utils/ColorUtils.ts b/src/api/utils/ColorUtils.ts index ccb6e27a..126d271d 100644 --- a/src/api/utils/ColorUtils.ts +++ b/src/api/utils/ColorUtils.ts @@ -7,7 +7,16 @@ export class ColorUtils public static makeColorNumberHex(color: number): string { - return ( '#' + color.toString(16)); + let val = color.toString(16); + if(val.length < 6) + { + const diff = 6 - val.length; + for(let i = 0; i < diff; i++) + { + val = '0' + val; + } + } + return ( '#' + val); } public static convertFromHex(color: string): number