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

Function getColorByName

src/utils/color.ts:433–441  ·  view source on GitHub ↗
($color: string)

Source from the content-addressed store, hash-verified

431}
432
433function getColorByName($color: string): RGBA {
434 const n = knownColors.get($color)!;
435 return {
436 r: (n >> 16) & 255,
437 g: (n >> 8) & 255,
438 b: (n >> 0) & 255,
439 a: 1,
440 };
441}
442
443function getSystemColor($color: string): RGBA {
444 const n = systemColors.get($color)!;

Callers 1

parseFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected