Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Component: Color Picker #376

Closed
endigo9740 opened this issue Oct 15, 2022 · 3 comments · Fixed by #755
Closed

New Component: Color Picker #376

endigo9740 opened this issue Oct 15, 2022 · 3 comments · Fixed by #755
Assignees
Labels
feature request Request a feature or introduce and update to the project.
Milestone

Comments

@endigo9740
Copy link
Contributor

Describe what feature you'd like. Pseudo-code, mockups, or screenshots of similar solutions are encouraged!

There are MULTIPLE ways to tackle this, but the main thing is the color input does not yet have great cross-browser support:
https://css-tricks.com/color-inputs-a-deep-dive-into-cross-browser-differences/

As such, we should provide a solution to work around this. In addition to providing this like a standard component, we would have immediate use for it on the Theme Generator for hex color values.

A few suggestions:

  • It must support hex colors, if nothing else
  • Ideally it would be great to support all color values - hex, rgb, rgba, hsl, etc
  • We might can use a color input within the component, similar to a Slide Toggle uses checkbox
  • UI should support embed directly on the page, as well as Menu popups (similar to the native input)

What type of pull request would this be?

New Feature

Any links to similar examples or other references we should review?

As usual the Mantine version should provide great inspiration for the feature set:
https://mantine.dev/core/color-picker/

@endigo9740 endigo9740 added help wanted Extra attention is needed feature request Request a feature or introduce and update to the project. labels Oct 15, 2022
@endigo9740 endigo9740 changed the title New Utility: Color Picker New Component: Color Picker Oct 15, 2022
@endigo9740 endigo9740 added this to the v1.0 milestone Nov 16, 2022
@ghost
Copy link

ghost commented Dec 29, 2022

Are you thinking something like:
https://vuetifyjs.com/en/components/color-pickers/#examples

Or something like:
https://element-plus.org/en-US/component/color-picker.html#alpha

Or maybe one of these:
https://casesandberg.github.io/react-color/

Let me know your thoughts, I think I would enjoy working on this

@ghost
Copy link

ghost commented Dec 30, 2022

Just my two cents here, the one from vuetify, and the chrome one from react color seem to be the best by far in terms of looks and functionality.

@endigo9740 endigo9740 self-assigned this Jan 2, 2023
@endigo9740 endigo9740 removed the help wanted Extra attention is needed label Jan 2, 2023
@endigo9740
Copy link
Contributor Author

endigo9740 commented Jan 2, 2023

Rather than getting too creative here, I've opted for stying the native color input as part of the forms.css element styles. Vendor specific styles exist to help control the styling on these, so I was able to provide something pretty nice by default. This responds to the theme rounded-token setting.

Before vs After:

Screen Shot 2023-01-02 at 1 51 14 PM

Screen Shot 2023-01-02 at 2 04 16 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request a feature or introduce and update to the project.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant