I want to use Grid
to tabulate the following list
and have the same background color for rows of the same value on column 4.
The actual list
is very long.
list=
{{1, {2, 1, 1}, {1, 0, -1, 1}, 4.48},
{2, {-2, -1, -1}, {-1, 0, 1, -1}, 4.48},
{3, {2, 1, 1}, {1, 0, -1, 1}, 4.48},
{4, {-2, -1, -1}, {-1, 0, 1, -1}, 4.48},
{9, {-2, -1, 1}, {-1, 0, 1, 1}, 4.48},
{10, {2, 1, -1}, {1, 0, -1, -1}, 4.48},
{11, {2, 1, -1}, {1, 0, -1, -1}, 4.48},
{12, {-2, -1, 1}, {-1, 0, 1, 1}, 4.48},
{5, {0, -1, 0}, {1, -2, 1, 0}, 5.266},
{6, {0, -1, 0}, {1, -2, 1, 0}, 5.266},
{7, {0, 1, 0}, {-1, 2, -1, 0}, 5.266},
{8, {0, 1, 0}, {-1, 2, -1, 0}, 5.266},
{5, {1, -4, 0}, {2, -3, 1, 0}, 5.6323},
{6, {1, -4, 0}, {2, -3, 1, 0}, 5.6323},
{7, {-1, 4, 0}, {-2, 3, -1, 0}, 5.6323},
{8, {-1, 4, 0}, {-2, 3, -1, 0}, 5.6323}}
I found a solution to a similar question here. I wonder how can I build the colorrules
elegantly. Thanks.