Skip to content

Commit c961d00

Browse files
committed
hue parentheses for smaller size
1 parent be069f9 commit c961d00

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

minidenticons.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function pseudoFNV1a(str) {
2525
export function identicon(username, saturation=DEFAULT_SATURATION, lightness=DEFAULT_LIGHTNESS) {
2626
const hash = pseudoFNV1a(username)
2727
// dividing hash by FNV_PRIME to get last XOR result for better color randomness (will be an integer except for empty string hash)
28-
const hue = hash / FNV_PRIME % COLORS_NB * 360 / COLORS_NB
28+
const hue = ((hash / FNV_PRIME) % COLORS_NB) * (360 / COLORS_NB)
2929
const rects = [...Array(username ? 25 : 0).keys()]
3030
// 2 + ((3 * 5 - 1) - modulo) to concentrate squares at the center
3131
.map(i => hash % (16 - i % 15) < SQUARE_DENSITY ?

minidenticons.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

minidenticons.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)