MCPcopy Index your code
hub / github.com/darkreader/darkreader / getRegisteredColor

Function getRegisteredColor

src/inject/dynamic-theme/palette.ts:53–60  ·  view source on GitHub ↗
(type: ColorType, parsed: RGBA)

Source from the content-addressed store, hash-verified

51}
52
53export function getRegisteredColor(type: ColorType, parsed: RGBA): string | null {
54 const hex = rgbToHexString(parsed);
55 const registered = registeredColors.get(hex);
56 if (registered?.[type]) {
57 return getRegisteredVariableValue(type, registered);
58 }
59 return null;
60}
61
62export function registerColor(type: ColorType, parsed: RGBA, value: string): string {
63 const hex = rgbToHexString(parsed);

Callers 1

modifyAndRegisterColorFunction · 0.90

Calls 3

rgbToHexStringFunction · 0.90
getMethod · 0.65

Tested by

no test coverage detected