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 7b3bf4b commit 9d8421cCopy full SHA for 9d8421c
1 file changed
cameron.go
@@ -28,7 +28,7 @@ func Identicon(data []byte, cell int) image.Image {
28
var nib [32]byte
29
for i := 0; i < 16; i++ {
30
nib[2*i] = digest[i] >> 4 // High 4 bits.
31
- nib[2*i+1] = digest[i] & 0x0F // Low 4 bits.
+ nib[2*i+1] = digest[i] & 0x0f // Low 4 bits.
32
}
33
34
// Build the 5×5 symmetry mask.
@@ -66,8 +66,8 @@ func Identicon(data []byte, cell int) image.Image {
66
v = (v << 4) | uint32(nib[i])
67
68
hueBits := v >> 16
69
- satBits := (v >> 8) & 0xFF
70
- lgtBits := v & 0xFF
+ satBits := (v >> 8) & 0xff
+ lgtBits := v & 0xff
71
h := float64(hueBits) * 360 / 4095
72
s := 65.0 - float64(satBits)*20/255
73
l := 75.0 - float64(lgtBits)*20/255
0 commit comments