enyancc / vscode-ext-color-highlight

Extension adds colored border around css/web colors in the editor
GNU General Public License v3.0
262 stars 83 forks source link

Match Words doesn't work with 'lightGray' or 'darkGray' from java.awt.Color due to being mixed-case #164

Open ZStoner opened 2 years ago

ZStoner commented 2 years ago

In the java.awt.Color class, the colors for Light Gray and Dark Gray are defined as Color.lightGray and Color.darkGray.

The extension won't highlight these color names as written apparently because the terms use mixed-case.

However, the terms lightgray or darkgray (in all lowercase), DO work. Of course, I can't use these in the code as Java identifiers are case-sensitive.

Likewise any other "case variants" don't work either (for ANY of the standard colors): Examples: white works, while WHITE or White do not.

Attached a sample Java file to highlight what "words" do or do not work...

colorHighlightTest.java.txt

Other Notes:

wangyunduo commented 1 year ago

Hi bro 👋 I notice that this repo has not had any new commits for the past year, and version 2.6.0, submitted last year, has not been released. Therefore, I forked the repo and developed a new extension based on version 2.6.0, named Color Highlight - Hue Show Better Version.

The extension Color Highlight - Hue Show Better Version can solve your issue. It supports case-insensitive named colors.

Feel free to try it out : ) https://marketplace.visualstudio.com/items?itemName=Yunduo.color-highlight-css-color-4

image