Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Noumena-Network/code
/ scale
Function
scale
src/ink/termio/osc.ts:333–334 ·
view source on GitHub ↗
(s: string)
Source
from the content-addressed store, hash-verified
331
if
(rgb) {
332
// XParseColor: N hex digits → value / (16^N - 1), scale to 0-255
333
const
scale = (s: string) =>
334
Math.round((parseInt(s, 16) / (16 ** s.length - 1)) * 255)
335
return
{
336
type
:
'rgb'
,
337
r: scale(rgb[1]!),
Callers
1
parseOscColor
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected