A VS code extension uses VS code
's code action for refactoring your color unit code. It can transform your color unit to RGB, RGBA, etc.
convert your color token to:
- RGB, RGBA
- HSL
- 6-dight hexadecimal and 3-dight hexadecimal(if available)
In order to install an extension you need to launch the Command Pallete (Ctrl + Shift + P or Cmd + Shift + P) and type Extensions. There you have either the option to show the already installed snippets or install new ones. Search for color-exchange
and install it.
After installation and reload VS code, open any file and move the cursor into color unit, click the lightbulbs in your editor or Use shortcut: Cmd + .
(Ctrl + .
in windows), then select your new color unit.
vs code
>=1.27.0
- Add more unit test
- Support convert other color to keyword color if available
- Add CI
- Add
codecov
for code coverage
- Add support for convert to keyword color if available
- Fix code action incorrect appeared when cursor in the tail of line.
- Fix code action not appeared when cursor in color unit's function notation
- Fix the same color token in code actions which is need refactor.
Basic feature.
Enjoy!