ArrayPlot[
Table[
Which[
Head[(Subscript[σ, i,j])]===Cycles∨i==j, Red,i<j, Yellow,i>j, White],
{j,n},{i,n}],
Mesh -> True, Frame -> True, FrameTicks ->Range@n, AspectRatio -> 9/16, ImageSize -> 640
] // Dynamic

Feed[(Subscript[g, 3])]