diff --git a/README.md b/README.md index d2c2e2f..fedc2f1 100644 --- a/README.md +++ b/README.md @@ -24,17 +24,17 @@ This extension can be used through its color pickers, commands, or context menu To see settings press `CTRL + ,` OR `⌘ + ,` -| Id | Description | Default | Available values | Example | -| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| color-picker-universal.disable | Disables the extension | false | true false | true | -| color-picker-universal.ignoreVariableName | If enabled, ignores colors in variables names | true | true false | false | -| color-picker-universal.preferLegacy | If enabled, colors are displayed in legacy mode when possible | false | true false | true | -| color-picker-universal.languages | Enabled language identifiers. Use "!" to exclude languages | ["*"] | [Default identifiers](https://code.visualstudio.com/docs/languages/identifiers#_known-language-identifiers) | ["*", "!css", "!less", "!sass", "!scss"] | -| color-picker-universal.formatsFrom | Enabled formats to translate from. Use "!" to exclude formats | ["*"] | "\*" "device-cmyk" "hex" "hsl" "hwb" "named" "rgb" "hex0x" "lab" "lch" "oklab" "oklch" "a98" | ["*", "!hex_0x", "!named"] | -| color-picker-universal.formatsTo | Enabled formats to translate into. Use "!" to exclude formats | ["*"] | "\*" "cmyk" "hex" "hsl" "hwb" "named" "rgb" "hex0x" "lab" "lch" "oklab" "oklch" "a98" | ["*", "!hex_0x", "!cmyk", "!hwb"] | -| color-picker-universal.maxDigits | Max number of decimal digits | 2 | | 5 | -| color-picker-universal.customRegexes | Set custom regexes for given formats | {} | See [Custom Regexes](#-custom-regexes) | { "a98": ["my-a98\\((\\d+(?:\\.\\d+)?) \\$ (\\d+(?:\\.\\d+)?) \\$ (\\d+(?:\\.\\d+)?)(?: \\$ (\\d+(?:\\.\\d+)?))?\\)",]} | -| color-picker-universal.avoidDuplicate | If enabled, duplicate color pickers will be avoided. Note: On these built-in color pickers, the extension formats and configurations won't apply | false | true false | true | +| Id | Description | Default | Available values | Example | +| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| color-picker-universal.disable | Disables the extension | false | true false | true | +| color-picker-universal.ignoreVariableName | If enabled, ignores colors in variables names | true | true false | false | +| color-picker-universal.preferLegacy | If enabled, colors are displayed in legacy mode when possible | false | true false | true | +| color-picker-universal.languages | Enabled language identifiers. Use "!" to exclude languages | ["*"] | [Default identifiers](https://code.visualstudio.com/docs/languages/identifiers#_known-language-identifiers) | ["*", "!css", "!less", "!sass", "!scss"] | +| color-picker-universal.formatsFrom | Enabled formats to translate from. Use "!" to exclude formats | ["*"] | "\*" "device-cmyk" "hex" "hsl" "hwb" "named" "rgb" "hex0x" "lab" "lch" "oklab" "oklch" "a98" | ["*", "!hex_0x", "!named"] | +| color-picker-universal.formatsTo | Enabled formats to translate into. Use "!" to exclude formats | ["*"] | "\*" "cmyk" "hex" "hsl" "hwb" "named" "rgb" "hex0x" "lab" "lch" "oklab" "oklch" "a98" | ["*", "!hex_0x", "!cmyk", "!hwb"] | +| color-picker-universal.maxDigits | Max number of decimal digits | 2 | | 5 | +| color-picker-universal.customRegexes | Set custom regexes for given formats | {} | See [Custom Regexes](#-custom-regexes) | { "a98": ["my-a98\\((\\d+(?:\\.\\d+)?) \\$ (\\d+(?:\\.\\d+)?) \\$ (\\d+(?:\\.\\d+)?)(?: \\$ (\\d+(?:\\.\\d+)?))?\\)",]} | +| color-picker-universal.avoidDuplicate | If enabled, duplicate color pickers will be avoided. Note: On these built-in color pickers, the extension's formats and configurations won't apply | false | true false | true | ## ✍ Commands @@ -117,8 +117,8 @@ Here is a rgb regex example where we match r, g, and b values, and an optional a - The regex capture groups must only capture the required values, and the optional one (alpha) if desired - https://regexper.com/ This website is a great way to visualize and tweak regexes. [Here](https://regexper.com/#my-rgb%5C%28%28%5Cd%2B%28%3F%3A%5C.%5Cd%2B%29%3F%29%20%5C%24%20%28%5Cd%2B%28%3F%3A%5C.%5Cd%2B%29%3F%29%20%5C%24%20%28%5Cd%2B%28%3F%3A%5C.%5Cd%2B%29%3F%29%28%3F%3A%20%5C%24%20%28%5Cd%2B%28%3F%3A%5C.%5Cd%2B%29%3F%29%29%3F%5C%29) is the regex above visualized there. Note that **escape backslashes (\\) MUST be removed** when entering the regex there -## 🐞 Known Issues +## Duplication Issue -[#68](https://github.com/jeronimoek/color-picker-universal/issues/68) When working with **css**, **less**, **sass**, and **scss** files, the color picker is duplicated due to the default Vscode color picker. Currently, the only workaround is excluding these file extensions in the `color-picker-universal.languages` setting (see example value above) +[#68](https://github.com/jeronimoek/color-picker-universal/issues/68) When working with **css**, **less**, **sass**, and **scss** files, the color picker is duplicated due to the default built-in Vscode color picker. To avoid this, you can set the `color-picker-universal.avoidDuplicate` setting to **true** (see [Settings](#-settings)). Note that by doing this, on these default built-in color pickers, the extension's formats and configurations won't apply ![Duplicated picker in css file](images/css-duplication.png)