# Set up color dict set serverColors {"Red" "004" "Green" "003" "Blue" "002"} # Build output string set output "" foreach world $worlds { # Get name, score, and color for this server set name [dict get $world "name"] set score [dict get $world "score"] set color [dict get $serverColors [dict get $world "color"]] # Append colorized server info set output "$output\002\$color$name\$color\002: \002$score\002, " }