in lib/utils/index.js [43:58]
g: parseInt(result[2], 16),
b: parseInt(result[3], 16),
}
: {};
}
export function colourIsLight(hex) {
const { r, g, b } = hexToRgb(hex);
// Counting the perceptive luminance
// human eye favors green color...
const a = 1 - (0.299 * r + 0.587 * g + 0.114 * b) / 255;
return a < 0.5;
}
export function getApiURL(path, queryParams) {
if (!path.startsWith('/api')) {