style: coloured row background (#571)

* style: coloured row background
This commit is contained in:
Carlos Valente
2023-11-05 09:47:55 +01:00
committed by GitHub
parent f57faf1837
commit 98bd320cbd
2 changed files with 11 additions and 2 deletions
+2 -2
View File
@@ -15,8 +15,8 @@ export const getAccessibleColour = (bgColour?: string): ColourCombination => {
try {
const textColor = Color(bgColour).isLight() ? 'black' : '#fffffa';
return { backgroundColor: bgColour, color: textColor };
} catch (error) {
console.log(`Unable to parse colour: ${bgColour}`);
} catch (_error) {
/* we do not handle errors here */
}
}
return { backgroundColor: '#000', color: '#fffffa' };