faster ...

This commit is contained in:
6543 2020-09-10 22:58:35 +02:00
parent c32969ffb1
commit e2d3f41734
Signed by: 6543
GPG Key ID: A1CA74D27FD13271
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ func NewHexColor(hc string) (*HexColor, error) {
return c, nil
}
if len(hc) == 3 {
c.hex = hc[:1] + hc[:1] + hc[1:][:1] + hc[1:][:1] + hc[2:] + hc[2:]
c.hex = string([]byte{hc[0], hc[0], hc[1], hc[1], hc[2], hc[2]})
return c, nil
}
}