Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>color2variableNew to Visual Studio Code? Get it now.
color2variable

color2variable

vscodeex

|
34 installs
| (0) | Free
检查代码中匹配到 @ant-design/colors color 的值,将颜色值转换成对应的变量。
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

color2variable

By matching color from @ant-design/colors, Converts selected text from color to variable. It supports css , less and sass file.

Doc

  • 色彩
  • @ant-design/colors
  • color2variable

Usage

Keybindings

  • Ctrl+t / Cmd+t Converts selected text from color to variable.

Commands

  • color2variable: Converts selected text from color to variable.

Extension Settings

This extension contributes the following settings:

  • notify-if-no-changes: enable/disable notification that alerts the users if no conversion could be made.
  • only-change-first-ocurrence: set to change all or only the first selected ocurrence of color/variable
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft