(category: HighlightColorCategory, usage: ColorUsageType)
| 51 | } |
| 52 | |
| 53 | export function getColor(category: HighlightColorCategory, usage: ColorUsageType): string { |
| 54 | // Hardcode for now, but could be configurable in the future |
| 55 | const base = colorBase(category) |
| 56 | if (usage == ColorUsageType.CAP_TEXT) { |
| 57 | return `var(--${base}-cap-text)` |
| 58 | } |
| 59 | if (usage === ColorUsageType.NODE_FILL) { |
| 60 | return `var(--editor-node-block-fill)` |
| 61 | } |
| 62 | if (usage === ColorUsageType.CAP_FILL) { |
| 63 | return `var(--editor-node-block-fill)` |
| 64 | } |
| 65 | return `var(--${base}-text)` |
| 66 | } |
no test coverage detected