Merge getColoredString method into WindowMain