MCPcopy
hub / github.com/vitejs/vite / componentToHex

Function componentToHex

playground/test-utils.ts:78–81  ·  view source on GitHub ↗
(c: number)

Source from the content-addressed store, hash-verified

76})
77
78function componentToHex(c: number): string {
79 const hex = c.toString(16)
80 return hex.length === 1 ? '0' + hex : hex
81}
82
83function rgbToHex(rgb: string): string | undefined {
84 const match = rgb.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/)

Callers 1

rgbToHexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected