NODEDC_LAUNCHER/dc-ui-guideline/components/accent-contrast.json

41 lines
1.3 KiB
JSON

{
"id": "accent-contrast",
"name": "NodeDcAccentContrast",
"kind": "utility",
"status": "draft-stable",
"summary": "Shared contrast helper that derives readable text color from a component accent color.",
"sourceRefs": [
{
"project": "nodedc_launcher",
"file": "src/shared/lib/accentContrast.ts",
"exports": [
"getReadableNodedcTextRgb",
"createNodedcAccentStyleVars",
"getNodedcRelativeLuminance"
]
},
{
"project": "nodedc_taskmanager",
"file": "plane-src/packages/utils/src/theme/nodedc-accent.ts",
"exports": [
"getReadableNodedcTextRgb",
"applyNodedcAccent"
]
}
],
"visualContract": {
"darkTextRgb": [11, 17, 23],
"lightTextRgb": [245, 247, 251],
"luminanceThreshold": 0.52,
"cssVars": [
"--nodedc-component-accent-rgb",
"--nodedc-component-on-accent-rgb"
]
},
"rules": [
"Any filled accent button or active accent chip must use the computed on-accent text color.",
"Do not hardcode black or white text on an accent fill unless the accent contrast helper owns that decision.",
"Component-local accent variables are allowed when global --nodedc-accent-rgb is not the intended color for that component."
]
}