# Set up color dict set serverColors {"Red" "00304" "Green" "00303" "Blue" "00302"} # 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\003\002: \002$score\002, " }