Skip to content

IronLu233/vscode-color-exchange

Repository files navigation

vscode-color-exchange README

Build Status codecov

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.

Features

convert your color token to:

  • RGB, RGBA
  • HSL
  • 6-dight hexadecimal and 3-dight hexadecimal(if available)

2018-10-03 11 59 49

Installation

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.

Usage

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.

Requirements

vs code >=1.27.0

TODOS

  • Add more unit test
  • Support convert other color to keyword color if available
  • Add CI
  • Add codecov for code coverage

Release Notes

1.1.0

  • Add support for convert to keyword color if available

1.0.1

  • 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.

1.0.0

Basic feature.


Enjoy!