Evaluated proc magic:clr2wand str { set out $str; set found [uniq [regexp -inline -all {(red|orange|yellow|green|blue|purple|pink|white|grey|black|#[a-zA-Z0-9]{6})} $str]]; map $found {x { set out [regsub -all $x $out [magic:color $x]] }}; . $out }