Skip to content

[DISCUSS] Color Picker #1847

Closed
Closed

Description

@thompsongl

The current EuiColorPicker is no longer suitable for our needs:

Considerations:

  • Features
    • Hue, saturation, & lightness selection
    • Direct text input
    • Swatches. Predefined and customizable
    • ?
  • Design options
    • Wheel
      • Hue & saturation wheel. Lightness slider.
      • Screen Shot 2019-04-17 at 1 51 38 PM
    • Box
      • Hue slider. Saturation & lightness box.
      • Screen Shot 2019-04-17 at 1 50 59 PM
  • Conversions
    • RGB
    • HSL
    • Hex
    • ?

Research ongoing for existing options beyond react-color, but it is likely we'll need to add desired functionality on top of whatever can be found. Writing from scratch may be the best option. Existing work to potentially build on: #856.

Activity

  1. snide commented on Apr 17, 2019

    @snide
    Contributor

    I think from the design wishlist we'd want:

    1. Use the hex as a form control by default. Meaning you should just be able to type in and use it directly and validate the hex string. A preview of that color should exist "in" the input similar to Replace EuiColorPicker with an accessible, custom component #856
    2. Has the ability to show swatches. These should be built in by default using our color blind palette, but the consumer should be able to pass in their own array of colors.
    3. Has some manner of visual selection (wheel or square style doesn't matter too much). It would be nice if this was also keyboard driven, but as long as 1 is covered this is likely nice to have from a reqs perspective.
    4. Should use our popover service if possible, the same as our other components.

    Bonus things

    1. The option to allow an opacity slider.
    2. Because of this, some manner of rgba or 8 digit hex? Likely the consumer might want to provide the format they want.
    3. Some manner of add/save controls to fill the canvas perspective

    FWIW I still like my original PR and just think it needs the visual selection and ability to handle opacity.

  2. ryankeairns commented on Apr 17, 2019

    @ryankeairns
    Contributor

    In Canvas, there is a color picker that does a number of these things though it does not have a wheel/box selector. One thing that it does provide, which I don't think is mentioned above, is the ability to add a swatch. I don't know if that is something we necessarily need to provide here, but just pointing out that this exists.

    Screenshot 2019-04-17 15 47 36

  3. cchaos commented on May 9, 2019

    @cchaos
    Contributor

    Do we also then need to add it to the input color indicator?

    Screen Shot 2019-05-09 at 13 14 55 PM

  4. thompsongl commented on May 31, 2019

    @thompsongl
    ContributorAuthor

    Closing in favor of smaller, feature-specific issues

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions