MCPcopy Create free account
hub / github.com/bytebase/bytebase / hexToColor

Function hexToColor

frontend/src/utils/css.ts:50–57  ·  view source on GitHub ↗
(hex: string)

Source from the content-addressed store, hash-verified

48 [color.red, color.green, color.blue].map(channelToByte).join(" ");
49
50export const hexToColor = (hex: string): Color => {
51 const [red, green, blue] = hexToRgb(hex);
52 return create(ColorSchema, {
53 red: red / 255,
54 green: green / 255,
55 blue: blue / 255,
56 });
57};
58
59/**
60 *

Callers 9

toStoredThemeFunction · 0.90
index.test.tsFile · 0.90
createWorkspaceSliceFunction · 0.90
ProjectSettingsPageFunction · 0.90
css.test.tsFile · 0.90

Calls 1

hexToRgbFunction · 0.70

Tested by 1

toStoredThemeFunction · 0.72