vscode-colorize icon indicating copy to clipboard operation
vscode-colorize copied to clipboard

RGB Whitespace Syntax not recognized

Open hennessyevan opened this issue 5 years ago • 4 comments

Whitespace syntax is a valid CSS RGB syntax but is not supported by this extension. https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#RGB_syntax_variations

image

hennessyevan avatar May 05 '20 18:05 hennessyevan

It is important not to forget about supporting the same syntax for hsl():

.class {
  --a: hsl(12 34% 56%);
  --a: hsl(12deg 34% 56%);
  --a: hsl(12 34% 56% / 0.78);
  --a: hsl(12deg 34% 56% / 0.78);
}

Each of the options is valid syntax.

firefoxic avatar May 26 '21 22:05 firefoxic

Bump to this issue; note that Stylelint actively encourages (and defaults to) the comma free syntax at the moment: https://stylelint.io/user-guide/rules/color-function-notation/

ashwinuae avatar Mar 07 '23 22:03 ashwinuae

Please add support for the following syntax:

hsl(338deg 73% 97%)

Source: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/hsl#syntax

Currently I have to specify my values two times in order for me to see the colors in VS Code:

flamingo: {
          50: "hsl(338deg 73% 97%)",
          100: "hsl(337deg 85% 95%)",
          200: "hsl(338deg 92% 90%)",
          300: "hsl(339deg 94% 82%)",
          400: "hsl(340deg 92% 68%)",
          500: "hsl(342deg 87% 60%)",
          600: "hsl(345deg 76% 51%)",
          700: "hsl(346deg 83% 42%)",
          800: "hsl(347deg 80% 35%)",
          900: "hsl(347deg 74% 30%)",
          950: "hsl(348deg 91% 17%)",
          // 50: "hsl(338, 73%, 97%)",
          // 100: "hsl(337, 85%, 95%)",
          // 200: "hsl(338, 92%, 90%)",
          // 300: "hsl(339, 94%, 82%)",
          // 400: "hsl(340, 92%, 68%)",
          // 500: "hsl(342, 87%, 60%)",
          // 600: "hsl(345, 76%, 51%)",
          // 700: "hsl(346, 83%, 42%)",
          // 800: "hsl(347, 80%, 35%)",
          // 900: "hsl(347, 74%, 30%)",
          // 950: "hsl(348, 91%, 17%)",
        },

spacecat avatar Feb 04 '24 11:02 spacecat

I have created a pull request for the HSL syntax:

https://github.com/KamiKillertO/vscode-colorize/pull/900

Please upvote so that the maintainer @KamiKillertO 😏 can review and release a new build for VS Code.

spacecat avatar Feb 04 '24 14:02 spacecat