ryu1kn / vscode-text-marker

Visual Studio Code Extension. Select text in your code and mark all matches. The marking colour is configurable
https://marketplace.visualstudio.com/items?itemName=ryu1kn.text-marker
MIT License
85 stars 17 forks source link

feature request: minimum contrast ratio setting #53

Open BoruiGu opened 4 years ago

BoruiGu commented 4 years ago

use case: i create and save highlights both for use my self and also share them out to other users. the saved highlights look great when current vscode theme is similar to the vscode theme i was using when created the highlights. however when current theme is different, especially when switch between light and dark themes, the saved highlights often becomes unreadable due to low contrast with foreground / background color.

i suggest adding a setting similar to terminal.integrated.minimumContrastRatio to ensure saved highlights look good for all vsocde themes

ryu1kn commented 4 years ago

Hi @BoruiGu , welcome back! 😃

I agree, if you use the same highlights in different colour themes, it must be a real issue. One quick work around I see some extensions use and often sufficiently work is to introduce two config properties for specifying colours, one for light theme, another for dark theme.

I didn't know terminal.integrated.minimumContrastRatio, and don't know how it's using the given number to make the higher contrast, but sounds great.