MCPcopy
hub / github.com/darkreader/darkreader / modifyBackgroundColor

Function modifyBackgroundColor

src/inject/dynamic-theme/modify-colors.ts:203–208  ·  view source on GitHub ↗
(rgb: RGBA, theme: Theme, shouldRegisterColorVariable = true)

Source from the content-addressed store, hash-verified

201}
202
203export function modifyBackgroundColor(rgb: RGBA, theme: Theme, shouldRegisterColorVariable = true): string {
204 if (!shouldRegisterColorVariable) {
205 return _modifyBackgroundColor(rgb, theme);
206 }
207 return modifyAndRegisterColor('background', rgb, theme, _modifyBackgroundColor);
208}
209
210const MIN_FG_LIGHTNESS = 0.55;
211

Callers 13

getSelectionColorFunction · 0.90
defaultFallbackFactoryFunction · 0.90
getColorModifierFunction · 0.90
getBgImageValueFunction · 0.90
replaceCSSTemplatesFunction · 0.90
changeMetaThemeColorFunction · 0.90
modifyShadowColorFunction · 0.85

Calls 2

_modifyBackgroundColorFunction · 0.85
modifyAndRegisterColorFunction · 0.85

Tested by

no test coverage detected