Hex2Name is a Visual Studio Code extension that converts hex color values in your code to their equivalent (or closest) HTML color names regardless of file type. For hex values that do not have a direct CSS name, it finds the closest color name using the ΔE color difference formula.
Sometimes, the exact colors don't really matter (e.g. vibe coding, quick prototypes). This extension helps you quickly convert hex values to more readable color names, making your code cleaner and easier to understand at a glance.
Features
Converts 3-digit (#fff) and 6-digit (#ffffff) hex codes to their closest CSS color names.
Works on selected text or the entire document.
Displays the number of replacements in the status bar.
Usage
Highlight a section of text or leave nothing selected to process the entire document.
Run the command Hex2Name: Convert Selection or All from the Command Palette (Cmd+Shift+P).
The hex codes will be replaced with their corresponding color names.