UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

15 lines (13 loc) 368 B
import { cssVar } from "antd-style"; import { readableColor } from "polished"; //#region src/utils/safeReadableColor.ts const safeReadableColor = (bgColor, fallbackColor) => { try { return readableColor(bgColor); } catch { return fallbackColor || cssVar.colorText; } }; //#endregion export { safeReadableColor }; //# sourceMappingURL=safeReadableColor.mjs.map