Just to add to the variety: fun[list_, pos_, colors_] := Module[ {styles}, styles = Function[{x}, Style[x, #]] & /@ colors; list /. Flatten[Thread /@ MapThread[#1 -> #2 /@ #1 &, {list[[#]] & /@ pos, styles}]] ] Then fun[list, {{4, 9, 2}, {3, 5, 7}, {8, 1, 6}}, {Red, Green, Blue}] yields the same result.