diff --git a/qr.go b/qr.go index aae21db..eb2832a 100644 --- a/qr.go +++ b/qr.go @@ -33,7 +33,7 @@ func qrCodeToString(bits [][]bool, colorize bool) string { s := "" for y := -1; y < len(bits); y += 2 { if colorize { - s += TerminalForegroundWhite + TerminalBackgroundBlack + s += TerminalForegroundBlack + TerminalBackgroundWhite } for x := range bits[0] { upper := false @@ -45,13 +45,13 @@ func qrCodeToString(bits [][]bool, colorize bool) string { lower = bits[y+1][x] } if upper && lower { - s += " " - } else if !upper && lower { - s += "▀" + s += "█" } else if upper && !lower { + s += "▀" + } else if !upper && lower { s += "▄" } else { - s += "█" + s += " " } } if colorize { diff --git a/terminal.go b/terminal.go index 91de022..75de079 100644 --- a/terminal.go +++ b/terminal.go @@ -20,8 +20,8 @@ package main const ( - TerminalForegroundWhite string = "\033[37m" + TerminalForegroundBlack string = "\033[30m" TerminalForegroundReset string = "\033[39m" - TerminalBackgroundBlack string = "\033[40m" + TerminalBackgroundWhite string = "\033[47m" TerminalBackgroundReset string = "\033[49m" )