extensions icon indicating copy to clipboard operation
extensions copied to clipboard

Color picker

Open probablykasper opened this issue 2 years ago • 7 comments

Check for existing issues

  • [X] Completed

Describe the feature

Having a good color picker is a important for me when working with e.g CSS.

Features:

  • A command to open the color picker anywhere (not language-specific)
  • Try to detect the color from the selected text
  • Try to detect the color surrounding the cursor (if no text is selected)
  • Allow changing the format (HEX/RGB/HSL)
  • When finished, press Enter and the color is pasted in

If applicable, add mockups / screenshots to help present your vision of the feature

No response

probablykasper avatar Jun 18 '23 23:06 probablykasper

Some more features that are important for a color picker outside of CSS:

  • Choose integer / float representation
  • Choose colorspace for pasted numbers (at the very least linear & sRGB; BT.2020 and P3 would also be good)
  • Support having an alpha channel

jansol avatar Jun 28 '23 01:06 jansol

I'd love it if, when parsing hex colors, it placed a tiny square with the color right before it.

However, a color picker popup from a command like this would work as well.

ColorPicker

nickpoorman avatar Mar 31 '24 17:03 nickpoorman

This should probably get directly integrated at some point, but here's a stopgap solution for now. https://github.com/nickpoorman/colord?tab=readme-ov-file#zed-integration

ColorPickerTask

nickpoorman avatar Apr 01 '24 02:04 nickpoorman

I'd love it if, when parsing hex colors, it placed a tiny square with the color right before it.

However, a color picker popup from a command like this would work as well.

https://github.com/nickpoorman/colord?tab=readme-ov-file#zed-integration

Agree @nickpoorman , I used this in VSCode previously (works for more than just JSON files): https://marketplace.visualstudio.com/items?itemName=yechunan.json-color-token

Would love if we could build extensions to contribute these sorts of things to the community

peterjskaltsis avatar Apr 18 '24 00:04 peterjskaltsis

Is there an extension yet for this?

jxcg avatar May 02 '24 12:05 jxcg

Agreed,

In jetbrains ide's you're able to see the colors from a quick glance: image Not sure if this feature is possible, but certainly one i'd love to see in zed

eatenpancreas avatar Sep 15 '24 21:09 eatenpancreas