MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / hexComponent

Function hexComponent

source code/utils/systemTheme.ts:99–102  ·  view source on GitHub ↗

Normalize a 1–4 digit hex component to [0, 1].

(hex: string)

Source from the content-addressed store, hash-verified

97
98/** Normalize a 1–4 digit hex component to [0, 1]. */
99function hexComponent(hex: string): number {
100 const max = 16 ** hex.length - 1
101 return parseInt(hex, 16) / max
102}
103
104/**
105 * Read $COLORFGBG for a synchronous initial guess before the OSC 11

Callers 1

parseOscRgbFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected