for (i = 0, len = colors.length; i < len; i++) {
            stream.writeUInt8(colors[i].red);
            stream.writeUInt8(colors[i].green);
            stream.writeUInt8(colors[i].blue);
        }