zimonitrome / vscode-color-blocks

VSCode extension for coloring ranges of comments.
https://marketplace.visualstudio.com/items?itemName=zimonitrome.color-blocks
MIT License
7 stars 1 forks source link

Add support for named colors #8

Closed zioroboco closed 2 years ago

zioroboco commented 2 years ago

Hello! I've been enjoying this extension, particularly for making annotations while reading code. But the inability to quickly pick nice colors from memory was getting to me, so here we are!

This change adds the ability to specify colors by name, using the html color keywords.

Specifically it's using the colornames package. A full list of supported names is in the docs, but note that any of the numbered variants won't be captured by the regex at the moment.

I'd considered adding a map of specific names to hex values as a key in settings (with the standard html names maybe acting as the default), but that seemed like overkill for now. l'm using this change locally, and it's scratched my itch.

Thanks for all the work you've put into this! 🙏

zimonitrome commented 2 years ago

Good PR!