DeclareThatColor is a Sublime Text 3 plugin that aims to help developers declare CSS hex codes to their human-readable color names. It does this by using the ported JavaScript library from Chirag Mehta's name that color tool.
Download Package Control and use the Package Control: Install Package command from the command palette. Using Package Control ensures DeclareThatColor will stay up to date automatically.
From the Sublime Text's main menu click on:
- Edit → Declare That Color to declare hex codes
- Edit → Undeclare That Color to revert declarations
DeclareThatColor doesn't ship with default key bindings, but you may use the template below to set up your own.
[
{ "keys": ["Your shortcut"], "command": "declare_that_color" },
{ "keys": ["Your shortcut"], "command": "undeclare_that_color" }
]
For a comprehensive list of settings navigate to Preferences → Package Settings → DeclareThatColor → Settings - Default or go to DeclareThatColor/declare_that_color.sublime-settings. To avoid your changes from being overwritten by updates, make sure all of your edits are saved to Settings – User.
If you have any problem, idea or suggestion, feel free to create issues and pull requests on GitHub.
Distributed under the MIT license. See LICENSE for more information.
Herbert Verdida / @bertdida
This work was inspired by Chirag Mehta's name that color tool, much thanks to him for open sourcing his JavaScript code!
Also, thanks to @Tobaloidee for designing this project's logo.