iTwin / iTwinUI-react

A react component library for iTwinUI.
https://github.com/iTwin/iTwinUI
Other
83 stars 23 forks source link

Provide a color-picker control #312

Closed ayarbee closed 2 years ago

ayarbee commented 3 years ago

Feature

AWMDS is a map configuration tool that needs to allow users to define map layers. When defining a layer, aspects of the layer presentation are detailed. Those details include setting the colors of items drawn on the map. As a result there is a need for the user to be able to pick colors. Setting color by RGB value is not user friendly, a color picker capability would be very useful.

Examples

Possible components on github

https://uiwjs.github.io/react-color/ https://casesandberg.github.io/react-color/

How a color picker would be used in AWMDS

The user is editing/creating a layer, and whist defining the Symbology they click the Color control and a suitably styled color picker control appears to allow alteration of the value:

Color-Picker-Layer-Map-Config

FlyersPh9 commented 3 years ago

We should be able to use the @mixin iui-dropdown from menu/menu.scss to apply the correct background and drop shadow styling.

saaaaaally commented 3 years ago

@ayarbee We have standards for a basic and advanced color picker, which is what we are thinking of implementing but they are simpler than the screen shot you provided, will these still fulfill your needs?

Basic: image

Advanced: image

ayarbee commented 3 years ago

@saaaaaally I would agree that the advanced version of the color picker as shown would suit our needs. Thanks!

veekeys commented 2 years ago

Color picker component css is available in 0.30.0 🎉 https://itwin.github.io/iTwinUI/backstop/minified/color-picker.html

Next - react implementation. You can continue following this issue.

mayank99 commented 2 years ago

This is now available in iTwinUI-react 1.23.0 🎉 https://itwin.github.io/iTwinUI-react/?path=/story/core-colorpicker--advanced

We don't support alpha/opacity yet but it's coming in a future release.