color & customize bash prompt wrecks line length

Leap 42.1 64bit

I’m using this in my .bashrc to colorize my bash prompt. For some reason though it is shortening the number of columns (line length) that I can type. Like about 60 characters even though I have a big maximized konsole window. Same thing happens in a real tty. Any ideas?

prbold=$(tput bold)
red=$(tput setaf 1)
green=$(tput setaf 2)
blue=$(tput setaf 4)
yellow=$(tput setaf 3)
magenta=$(tput setaf 5)
reset=$(tput sgr0)

PS1="$prbold$red\u$reset$prbold@$blue\h$reset $prbold$magenta\w$reset$prbold]$green>$reset "

I found the answer in Arch wiki. Its working now rotfl!:

**Note: **Wrapping the tput output in \ ] is recommended by the Bash man page. This helps Bash ignore non-printable characters so that it correctly calculates the size of the prompt.