Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bernaferrari/FigmaToCode
/ toHex
Function
toHex
packages/backend/src/common/color.ts:48–48 ·
view source on GitHub ↗
(num: number)
Source
from the content-addressed store, hash-verified
46
const
b = Math.round(color.b * 255);
47
48
const
toHex = (num: number): string => num.toString(16).padStart(2,
"0"
);
49
return
`#${toHex(r)}${toHex(g)}${toHex(b)}`.toUpperCase();
50
}
51
Callers
1
rgbToCssColor
Function · 0.70
Calls
1
toString
Method · 0.80
Tested by
no test coverage detected