feat(board/promoted_attributes): improve rendering for color badge

This commit is contained in:
Elian Doran
2025-11-13 09:14:13 +02:00
parent 5dbe9e7da6
commit 3036d18df5
2 changed files with 30 additions and 24 deletions

View File

@@ -76,6 +76,11 @@ function getHue(color: ColorInstance) {
}
}
export function getReadableTextColor(bgColor: string) {
const colorInstance = Color(bgColor);
return colorInstance.isLight() ? "#000" : "#fff";
}
export default {
createClassForColor
};