\(\(\( (*\ 
      permute\ n\ different\ numbers\ in\ groups\ of\ three\ yielding\ the\ complexity\ of\ uniquely\ ordered\ sets\ *) \)\(
\)\(
\)\(\(For[n = 4, \ n ≤ 10, \ \(n++\), c = \(n!\)/\(\((n - 3)\)!\); \ 
        Print["n=  ", \ n, "     ", \ "c=  ", \ 
          c]\ ];\)\(
\)
    \)\)\)

\(\(\( (*\ 
      nest\ 5\ grayscale\ values\ into\ all\ possible\ \((60)\)\ uniquely\ ordered\ RGB\ sets\ *) \)\(
\)\(
\)\(\(val = 
        Table[{0, 0, 0}, \ {60}];\)

    \(n = 5;\)

    \(c = 0;\)
 (*\ 
      k = 3\ because\ of\ the\ three\ \(indices : \ r\), g, b\ *) 

    \(For[r = 1, 
        r ≤ n, \ \(r++\), 
For[g = 1, 
          g ≤ n, \(g++\), 
For[b = 1, 
            b ≤ n, \ \(b++\), 
If[
              r\  ≠ \ g\  ≠ \ \ b, c = c + 1; \ 
              val[\([c]\)] = {r/n, g/n, 
                  b/n}]\ 
]]];\)\ 


    \(g5 = Partition[val, 6];\)

    Show[Graphics[
        RasterArray[
          Apply[RGBColor, \ g5\ , {2}]]], \ \ ImageSize\  -> \ {360, 
          360}]

    \)\)\)

(* 
      permute 5 grayscale values into all possible (60) uniquely ordered sets with presorting of grayscale *) 

permsfive = 
        Join[
Permutations[{0.00, 0.25, 
              0.50}], 
Permutations[{0.00, 0.25, 
              0.75}], 
Permutations[{0.00, 0.25, 
              1.00}], 
Permutations[{0.00, 0.50, 
              0.75}], 
Permutations[{0.00, 0.50, 
              1.00}], 
Permutations[{0.00, 0.75, 
              1.00}], 
Permutations[{0.25, 0.50, 
              0.75}], 
Permutations[{0.25, 0.50, 
              1.00}], 
Permutations[{0.25, 0.75, 
              1.00}], 
Permutations[{0.50, 0.75, 
              1.00}]
];


    g5 = Partition[permsfive, 6];

    Show[Graphics[
        RasterArray[
          Apply[RGBColor,  g5 , {2}]]],   ImageSize  ->  {360, 
          360}]

(* 
      Display the palette generated above in a Schroedinger cube *) 

Show[
Graphics3D[
Line[
Append[permsfive, 
              First[permsfive]   (* 
                Append needs to be fixed so that the first and last points are not connected *) 
]]], 
ImageSize  ->  {256, 256}, 
        AxesStyle -> RGBColor[0, 1, 0],  
        BoxStyle -> RGBColor[0, 1, 0]];

grayset = {0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 
                1.0};
jointsub = Subsets[grayset, {3}, {1}];
\(For[x = 2, x <= 120, \(x++\), 
              subsub = Subsets[grayset, {3}, {x}]; 

              jointsub = Join[jointsub, \ subsub]];\)
permsten = Permutations[jointsub[[1]] ];
For[x = 2, x ≤ 120, x++, 
              permsten = 
                Join[permsten, Permutations[jointsub[[x]]  ] ] ];

g10 = Partition[permsten, 6];
Show[
            Graphics[
              RasterArray[
                Apply[RGBColor,  
                  g10 , {2}]]],   ImageSize  ->  {720, 720}]

Show[
Graphics3D[
Line[
Append[permsten, 
                    First[permsten]   (* 
                      Append needs to be fixed so that the first and last points are not connected *) 
]]], 
ImageSize  ->  {256, 256}, 
              AxesStyle -> RGBColor[0, 1, 0],  
              BoxStyle -> RGBColor[0, 1, 0]];