Skip to content

Standalone color picker HSL format uses two decimals for the percentages and forces commas #181545

Closed
@jakeparis

Description

@jakeparis

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.78.0
  • OS Version: OSX Ventura 13.3.1

It is unexpected and unusual to use percentages to the second decimal place for this function. Also, an increasingly used hsl format (and rgb as well) is comma-less, which I would hope this picker would allow.

Steps to Reproduce:

  1. Open the new standalone color picker
  2. click the modal title bar to change the format to hsl
  3. The inserted color is something like hsl(0, 85.70%, 43.70%)

What is expected?

I would expect the output format to be the same as when clicking the little color swatch in a css file and using the hsl format. In that case, the output is rounded to whole numbers hsl(0, 86%, 44%) which is what is expected.

There also should be the ability to insert the hsl color without commas, which in the example above would be hsl(0 86% 44%) (or hsl(0 86% 44% / 1) for alpha values).

I guess what I may be asking for here is a custom formatter for the inserted colors. If that's not possible, than how about a config option with many more color formats?

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugeditor-color-pickerEditor color picker widget issueshelp wantedIssues identified as good community contribution opportunitiesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions