You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Storybook Knob: Color knob allowing output be RGB or Hex #9
@shilman For this I think we should change SketchPicker to ChromePicker from react-color where the user can control the color styles between rgba, hex and hsla. Based on the user's choice color can be shown. If not the default can be set to rgba.
After doing some more digging, it seems that data is not shared to callback onChange on toggle between color variants in ChromPicker in react-color. Either we can provide a dropdown beside color swatch to select the variant or create a custom picker using react-color and manage toggle state.
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Hey, I'm just curious if this feature ever got implemented. The story I'm working on is looking for a hex color, but the color control only seems to output rgba() format colors. I've looked through the documentation, but there doesn't seem to be any configuration for color controls beyond just stating that your control is or isn't a color.
Activity
shilman commentedon Oct 16, 2020
PRs welcome!
imshubhamsingh commentedon Oct 16, 2020
@shilman For this I think we should change SketchPicker to ChromePicker from
react-colorwhere the user can control the color styles between rgba, hex and hsla. Based on the user's choice color can be shown. If not the default can be set to rgba.imshubhamsingh commentedon Oct 17, 2020
After doing some more digging, it seems that data is not shared to callback
onChangeon toggle between color variants in ChromPicker in react-color. Either we can provide a dropdown beside color swatch to select the variant or create a custom picker using react-color and manage toggle state.shilman commentedon Nov 13, 2020
Zoinks!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.1.0-rc.2 containing PR storybookjs/storybook#13102 that references this issue. Upgrade today to the
@nextNPM tag to try it out!Closing this issue. Please re-open if you think there's still more to do.
stale commentedon Dec 25, 2020
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
nick-compassaq commentedon Mar 18, 2021
Hey, I'm just curious if this feature ever got implemented. The story I'm working on is looking for a hex color, but the color control only seems to output rgba() format colors. I've looked through the documentation, but there doesn't seem to be any configuration for color controls beyond just stating that your control is or isn't a color.
shilman commentedon Mar 18, 2021
It's being implemented in addon-controls (that supercedes addon-knobs, which will be deprecated) right here: storybookjs/storybook#14249 (comment)
coler-j commentedon Jan 13, 2022
@shilman I don't see an API to control the hex/rgb output format. Do you know if it ever got added?