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

Hex color picker input in default HTML UI #597

Closed
jywarren opened this issue Jan 3, 2019 · 12 comments · Fixed by #1095
Closed

Hex color picker input in default HTML UI #597

jywarren opened this issue Jan 3, 2019 · 12 comments · Fixed by #1095

Comments

@jywarren
Copy link
Member

jywarren commented Jan 3, 2019

Some modules now are prompting for a color of input. We can accept RGBA, hex, etc, but for easier input, perhaps we can include a node library which has a simple built-in color picker? Then that could become an input type on its own!

@gitmate gitmate bot added HTML module New Module idea labels Jan 3, 2019
@jywarren jywarren added enhancement help wanted and removed HTML module New Module idea labels Jan 3, 2019
@gitmate
Copy link

gitmate bot commented Jan 3, 2019

GitMate.io thinks the contributor most likely able to help you is @ccpandhare.

Possibly related issues are #332 (Error in default color map), #423 (add slider UI to some modules HTML UI: brightness, blur), and #470 (UI Improvements ).

1 similar comment
@gitmate
Copy link

gitmate bot commented Jan 3, 2019

GitMate.io thinks the contributor most likely able to help you is @ccpandhare.

Possibly related issues are #332 (Error in default color map), #423 (add slider UI to some modules HTML UI: brightness, blur), and #470 (UI Improvements ).

@harshkhandeparkar
Copy link
Member

harshkhandeparkar commented Jan 3, 2019

How about implementing color pickers on the frontend https://farbelous.io/bootstrap-colorpicker/tutorial-Basics.html ?

@gitmate gitmate bot added HTML module New Module idea new-feature and removed help wanted labels Jan 3, 2019
@vibhorgupta-gh
Copy link

vibhorgupta-gh commented Jan 3, 2019

@harshkhandeparkar sounds good!
We could write a util function to convert the input into RGB or HEX and then pass it to the respective module to process it. Would like to work on this.
@jywarren how does that sound?

https://www.npmjs.com/package/pickr-widget
This looks nice too, in case we go with npm packages

@harshkhandeparkar
Copy link
Member

harshkhandeparkar commented Jan 3, 2019

What I feel is that the color input is up to the user frontend and the parsing of different values HEX HSLA RGB should be the job of the library so instead of adding more packages, we could add frontent code and make the library conlmpatible with it. This makes the library useful in more and more use cases.

@vibhorgupta-gh
Copy link

Makes sense. Parsing would then be the only concern for IS. Nice.

@jywarren
Copy link
Member Author

jywarren commented Jan 3, 2019 via email

@harshkhandeparkar
Copy link
Member

We also have to keep in mind that mobile phone users cannot use color pickers very efficiently.

@aashna27
Copy link

aashna27 commented Jan 3, 2019

@VibhorCodecianGupta would you like some help on this?? This issue sounds interesting to me.

@vibhorgupta-gh
Copy link

@aashna27 sure! I was thinking to provide a colour picker to all the modules requiring some sort of colour modules and since https://farbelous.io/bootstrap-colorpicker/tutorial-Basics.html already gives us the values of the RGBA, we could write a custom function to pick the respective channel values and pass them into the already existing input types

@harshkhandeparkar
Copy link
Member

I have a crazy idea in mind. How about inputting any type of color values but in the CSS format
i.e.
#rrggbbaa for HEX, hsla() for HSLA, rgba() for RGBA, space separated 255 255 255 255 for decimal rgba values.

We can write a util function which detects the type of values using maybe regex and returns an object of decimal(0-255) values for each color and for alpha?

@harshkhandeparkar harshkhandeparkar removed the module New Module idea label Mar 4, 2019
@jywarren
Copy link
Member Author

Harsh i think this is a great idea.

Looking for good UIs we could use, this is nice: https://farbelous.io/bootstrap-colorpicker/tutorial-Basics.html and bootstrap-compatible:

image

This one has lots of different options but may be more complex to install: https://casesandberg.github.io/react-color/

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants