MCPcopy Create free account
hub / github.com/codeaashu/claude-code / q

Function q

src/native-ts/color-diff/index.ts:106–107  ·  view source on GitHub ↗
(c: number)

Source from the content-addressed store, hash-verified

104const CUBE_LEVELS = [0, 95, 135, 175, 215, 255]
105function ansi256FromRgb(r: number, g: number, b: number): number {
106 const q = (c: number) =>
107 c < 48 ? 0 : c < 115 ? 1 : c < 155 ? 2 : c < 195 ? 3 : c < 235 ? 4 : 5
108 const qr = q(r)
109 const qg = q(g)
110 const qb = q(b)

Callers 1

ansi256FromRgbFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected