MCPcopy
hub / github.com/darkreader/darkreader / _modifyBackgroundColor

Function _modifyBackgroundColor

src/inject/dynamic-theme/modify-colors.ts:187–201  ·  view source on GitHub ↗
(rgb: RGBA, theme: Theme)

Source from the content-addressed store, hash-verified

185}
186
187function _modifyBackgroundColor(rgb: RGBA, theme: Theme) {
188 if (theme.mode === 0) {
189 if (__PLUS__) {
190 const poles = getBackgroundPoles(theme);
191 return modifyColorWithCache(rgb, theme, modifyLightSchemeColorExtended, poles[0], poles[1]);
192 }
193 return modifyLightSchemeColor(rgb, theme);
194 }
195 if (__PLUS__) {
196 const poles = getBackgroundPoles(theme);
197 return modifyColorWithCache(rgb, theme, modifyBgColorExtended, poles[0], poles[1]);
198 }
199 const pole = getBgPole(theme);
200 return modifyColorWithCache(rgb, theme, modifyBgHSL, pole);
201}
202
203export function modifyBackgroundColor(rgb: RGBA, theme: Theme, shouldRegisterColorVariable = true): string {
204 if (!shouldRegisterColorVariable) {

Callers 1

modifyBackgroundColorFunction · 0.85

Calls 4

getBackgroundPolesFunction · 0.90
modifyColorWithCacheFunction · 0.85
modifyLightSchemeColorFunction · 0.85
getBgPoleFunction · 0.85

Tested by

no test coverage detected