MCPcopy Index your code
hub / github.com/SplootCode/splootcode / getColor

Function getColor

packages/core/src/colors.ts:53–66  ·  view source on GitHub ↗
(category: HighlightColorCategory, usage: ColorUsageType)

Source from the content-addressed store, hash-verified

51}
52
53export 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}

Callers 1

constructorMethod · 0.90

Calls 1

colorBaseFunction · 0.85

Tested by

no test coverage detected