qa: Fix team color
This commit is contained in:
parent
c293b58a94
commit
4c3b07db1e
@ -22,11 +22,14 @@ export class Team {
|
||||
toHexColor() {
|
||||
let num = this.color;
|
||||
num >>>= 0;
|
||||
let b = num & 0xFF,
|
||||
g = (num & 0xFF00) >>> 8,
|
||||
r = (num & 0xFF0000) >>> 16,
|
||||
let b = (num & 0xFF).toString(16),
|
||||
g = ((num & 0xFF00) >>> 8).toString(16),
|
||||
r = ((num & 0xFF0000) >>> 16).toString(16),
|
||||
a = ( (num & 0xFF000000) >>> 24 ) / 255 ;
|
||||
return "#" + r.toString(16) + g.toString(16) + b.toString(16);
|
||||
if (r.length <= 1) r = "0" + r;
|
||||
if (g.length <= 1) g = "0" + g;
|
||||
if (b.length <= 1) b = "0" + b;
|
||||
return "#" + r + g + b;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user