Evrey color has ist own RGB triple, except now instead of 256 (0-255) possibilities for R, G, and B, each now has 16 (0-15). However, color pickers don't support color scales with a maximum of 15 so we need to map that onto the 255 scale. This can be done by multiplying (I use trick's scale because it has a maximum of 255 instead of 240) each of the values in the 0-15 scale by 17 (11 in hex). For example, we have arbitrary color (0,4,6) in the 15 scale as (0,68,102) in 255-scale RGB. In hexadecimal that 255-scale color is (00,44,66). This 16x16x16 color space gives a full palette of 4096 (16^3) colors from which you pick your 32, as opposed to the 16,777,216 (256^3) colors in the 255 scale. So our 15-scale RGB color space has the same range as the 255-scale one (min=0; max=255 after conversion because 17*15=255) but less precision of color picking because of its smaller size.
To simplify, each color's R, G, and B values should be multiples of 17.