[SV LRM 2017] What is intend of using sort in structure?

struct { byte red, green, blue; } c [5];
 foreach (c[i])
      begin
        c[i].red = i;
        c[i].green = i+1;
        c[i].blue = i+2;
      end
    c.sort with ( item.red ); // sort c using the red field only
    $display("%p",c);
    c.sort( x ) with ( {x.blue, x.green} ); // sort by blue then green
    $display("%p",c);

The above code prints:
‘{’{red:0, green:1, blue:2}, '{red:1, green:2, blue:3}, '{red:2, green:3, blue:4}, '{red:3, green:4, blue:5}, '{red:4, green:5, blue:6}}

‘{’{red:0, green:1, blue:2}, '{red:1, green:2, blue:3}, '{red:2, green:3, blue:4}, '{red:3, green:4, blue:5}, '{red:4, green:5, blue:6}}

I can not understand intend here, Can someone elaborate ?

In reply to juhi_p:

Another bad example that does not do anything. Try the following:

struct { byte red, green, blue; } c [10];
 foreach (c[i])
      begin   c[i].red = $urandom_range(5);
   c[i].green =  $urandom_range(5);
   c[i].blue =  $urandom_range(5);
end

In reply to dave_59:

Got it corrected, Thanks.