Skip to content

Commit

Permalink
Exclude grayscale from selection (darkreader#3445)
Browse files Browse the repository at this point in the history
- Do not consider grayscale as option in selection as it would make it less visible.
- Resolves darkreader#1020
  • Loading branch information
Gusted authored and erkinalp committed Aug 23, 2020
1 parent 0a4a584 commit 3b50816
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/inject/dynamic-theme/modify-css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ export function getSelectionColor(theme: Theme) {
let backgroundColorSelection: string;
let foregroundColorSelection: string;
if (theme.selectionColor === 'auto') {
backgroundColorSelection = modifyBackgroundColor({r: 0, g: 96, b: 212}, theme);
foregroundColorSelection = modifyForegroundColor({r: 255, g: 255, b: 255}, theme);
backgroundColorSelection = modifyBackgroundColor({r: 0, g: 96, b: 212}, {...theme, grayscale: 0});
foregroundColorSelection = modifyForegroundColor({r: 255, g: 255, b: 255}, {...theme, grayscale: 0});
} else {
const rgb = parse(theme.selectionColor);
const hsl = rgbToHSL(rgb);
Expand Down

0 comments on commit 3b50816

Please sign in to comment.