mirror of
https://github.com/zadam/trilium.git
synced 2025-12-20 15:19:56 +01:00
feat(board/promoted_attributes): improve rendering for color badge
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user