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

Function parseRawColorValue

src/inject/dynamic-theme/variables.ts:801–810  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

799}
800
801function parseRawColorValue(input: string) {
802 const v = getRGBValues(input);
803 if (v) {
804 const color = v[3] < 1 ?
805 `rgb(${v[0]} ${v[1]} ${v[2]} / ${v[3]})` :
806 `rgb(${v[0]} ${v[1]} ${v[2]})`;
807 return {isRaw: true, color};
808 }
809 return {isRaw: false, color: input};
810}
811
812function handleRawColorValue(
813 input: string,

Callers 1

handleRawColorValueFunction · 0.85

Calls 1

getRGBValuesFunction · 0.90

Tested by

no test coverage detected