mirror of
https://codeberg.org/Codeberg/avatars.git
synced 2023-08-10 21:12:50 +03:00
fix alpha bug for beards
This commit is contained in:
parent
247db3a6f4
commit
89d1e4ed62
10
main.go
10
main.go
@ -6,6 +6,7 @@ import (
|
|||||||
"math/bits"
|
"math/bits"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@ -294,10 +295,10 @@ func maleAvatar(seed uint64) string {
|
|||||||
// Mustache (50% chance)
|
// Mustache (50% chance)
|
||||||
g.pickAorB(0.5,
|
g.pickAorB(0.5,
|
||||||
g.pickOne([]string{
|
g.pickOne([]string{
|
||||||
"<path d='M3 10v3h1v1h1v1h10v-1h1v-1h1v-3h-3v1H6v-1H3z' id='Path' fill='${mustacheColor}' fill-opacity='${mustacheColor.alpha}'/>",
|
"<path d='M3 10v3h1v1h1v1h10v-1h1v-1h1v-3h-3v1H6v-1H3z' id='Path' fill='${mustacheColor}' fill-opacity='${mustacheColorAlpha}'/>",
|
||||||
"<path d='M3 13h1v1h1v1h10v-1h1v-1h1v-3h-1v1h-1v1H5v-1H4v-1H3v3z' id='Path' fill='${mustacheColor}' fill-opacity='${mustacheColor.alpha}'/>",
|
"<path d='M3 13h1v1h1v1h10v-1h1v-1h1v-3h-1v1h-1v1H5v-1H4v-1H3v3z' id='Path' fill='${mustacheColor}' fill-opacity='${mustacheColorAlpha}'/>",
|
||||||
"<path d='M3 11v2h1v1h1v1h10v-1h1v-1h1v-2H3z' id='Path' fill='${mustacheColor}' fill-opacity='${mustacheColor.alpha}'/>",
|
"<path d='M3 11v2h1v1h1v1h10v-1h1v-1h1v-2H3z' id='Path' fill='${mustacheColor}' fill-opacity='${mustacheColorAlpha}'/>",
|
||||||
"<path d='M3 7v6h1v1h1v1h10v-1h1v-1h1V7h-1v2h-1v1h-1v1H6v-1H5V9H4V7H3z' id='Path' fill='${mustacheColor}' fill-opacity='${mustacheColor.alpha}'/>",
|
"<path d='M3 7v6h1v1h1v1h10v-1h1v-1h1V7h-1v2h-1v1h-1v1H6v-1H5V9H4V7H3z' id='Path' fill='${mustacheColor}' fill-opacity='${mustacheColorAlpha}'/>",
|
||||||
}),
|
}),
|
||||||
""),
|
""),
|
||||||
// Mouth
|
// Mouth
|
||||||
@ -373,6 +374,7 @@ func maleAvatar(seed uint64) string {
|
|||||||
"${eyesColor}", eyesColor.html(),
|
"${eyesColor}", eyesColor.html(),
|
||||||
"${eyebrowsColor}", eyebrowsColor.html(),
|
"${eyebrowsColor}", eyebrowsColor.html(),
|
||||||
"${mustacheColor}", mustacheColor.html(),
|
"${mustacheColor}", mustacheColor.html(),
|
||||||
|
"${mustacheColorAlpha}", strconv.Itoa(int(mustacheColor.a)),
|
||||||
"${mouthColor}", mouthColor.html(),
|
"${mouthColor}", mouthColor.html(),
|
||||||
"${glassesColor}", glassesColor.html(),
|
"${glassesColor}", glassesColor.html(),
|
||||||
"${clothesColor}", clothesColor.html(),
|
"${clothesColor}", clothesColor.html(),
|
||||||
|
Loading…
Reference in New Issue
Block a user