react-art icon indicating copy to clipboard operation
react-art copied to clipboard

modern browser colors cause an error

Open boygirl opened this issue 9 years ago • 3 comments

Hi there!

I'm converting a react library from svg to react-art, and I got hung up on using colors like "tomato", which cause an error, and result in nothing being rendered. I tracked the problem down to the art library, and opened a PR there. https://github.com/sebmarkbage/art/pull/12. I'd love a version bump whenever that lands.

Thanks!

boygirl avatar Jan 23 '16 06:01 boygirl

P.S. you can test out this change in art on my branch https://github.com/formidablelabs/react-art/tree/supportBrowserColors

boygirl avatar Jan 24 '16 22:01 boygirl

See my comment in https://github.com/sebmarkbage/art/pull/12

We'd have to make a solid case for why everyone else using this library with custom colors should have to download this list of hardcoded colors. Generally I think it makes more sense to define your own list of hardcoded colors.

E.g. myColorSet.highlightedRed or myColorSet.buttonColor. You can have your own list just represent the built-in browser colors if you want.

sebmarkbage avatar Apr 26 '16 16:04 sebmarkbage

@sebmarkbage see comment on sebmarkbage/art#12

boygirl avatar Apr 26 '16 19:04 boygirl