function colorDecodeId(color) {
  let id = 0;
  const radix = 256;
  const mult = radix - 1;
  id += Math.round(color[0] * radix * radix * radix * mult);
  id += Math.round(color[1] * radix * radix * mult);
  id += Math.round(color[2] * radix * mult);
  id += Math.round(color[3] * mult);
  return id;
}
Reads an id from a color-encoded array
Note: the expected range for each component is 0 to 1 with 256 steps.
@param {Array<number>} color Color array containing the encoded id
@return {number} Decoded id