function colorToRGBArray(color) {
    const c = parseInt(color.replace('#', ''), 16);

    return [Math.floor(c / 65536) % 256, Math.floor(c / 256) % 256, c % 256];
}
Converts a hex color code to RGB array.
@param {string} color - Hex color code
@returns {Array} RGB array