MCPcopy
hub / github.com/opentrace/opentrace / hexToNum

Function hexToNum

ui/src/components/pixi/PixiRenderer.ts:121–124  ·  view source on GitHub ↗

Convert CSS hex color string ('#3b82f6') to numeric (0x3b82f6).

(hex: string)

Source from the content-addressed store, hash-verified

119
120/** Convert CSS hex color string ('#3b82f6') to numeric (0x3b82f6). */
121function hexToNum(hex: string): number {
122 if (hex.startsWith('#')) return parseInt(hex.slice(1), 16);
123 return EDGE_FALLBACK_COLOR;
124}
125
126// ─── Geometry helpers for edge hit-testing ──────────────────────────────
127

Callers 5

_initMethod · 0.85
setThemeColorsMethod · 0.85
redrawAllEdgesMethod · 0.85
redrawDragEdgesMethod · 0.85
redrawAllEdges3DMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected