Open ZStoner opened 2 years 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
In the
java.awt.Color
class, the colors for Light Gray and Dark Gray are defined asColor.lightGray
andColor.darkGray
.The extension won't highlight these color names as written apparently because the terms use mixed-case.
However, the terms
lightgray
ordarkgray
(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, whileWHITE
orWhite
do not.Attached a sample Java file to highlight what "words" do or do not work...
Other Notes:
In
dynamic-contrast.js
: I saw.toLowerCase()
being used to lookup from thewebColors[]
array.I couldn't find
toLowerCase()
being used anywhere else. Note: I don't know if this file is a root cause, or is an example of when it should work to be case-insensitive.The outlined RGB color for
darkGray
doesn't seem to be correct, as it visually appears to be a brighter color than justgray
. Note: I think the rendered color forlightgray
also doesn't seem to quite match the RGB if you look closely.