commit 8b94dbcf03580871720953d538f1ca7b1179fd90
parent 12c04286a6e8efd659e4f9bca142943433112e7f
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Wed, 16 Nov 2022 03:02:08 -0500
refactor
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/cmd/art/main.go b/cmd/art/main.go
@@ -72,9 +72,9 @@ FoEVD2av5BES9MvnPsQulj9bU2lUokhBjM1+LERxbqfVfZ2ddAYRIMGF`
classIdx := 0
colorsMap := make(map[string]string)
colorsArr := [][]string{}
- for j := 0; j < h; j++ {
- for i := 0; i < w; i++ {
- c := im.At(i, j)
+ for y := 0; y < h; y++ {
+ for x := 0; x < w; x++ {
+ c := im.At(x, y)
hex := HexFromRgbColor(c.(color.NRGBA))
if _, ok := colorsMap[hex]; ok {
continue
@@ -134,7 +134,7 @@ func HexFromRgbColor(color color.NRGBA) string {
}
func getClassName(idx int) string {
- out := []rune{}
+ var out []rune
r := 'a' - 1
for idx >= 0 {
if r == 'z' {