andfanilo / streamlit-drawable-canvas

Do you like Quick, Draw? Well what if you could train/predict doodles drawn inside Streamlit? Also draws lines, circles and boxes over background images for annotation.
https://drawable-canvas.streamlit.app/
MIT License
563 stars 85 forks source link

Json_data hex color #43

Closed muhammadAgfian96 closed 3 years ago

muhammadAgfian96 commented 3 years ago

Hi, Thanks for amazing projects, relly helpful.

In choosing color section, can we choose the output of stroke color is rgb (xxx,xxx,xx) since opencv default is read rgb color. yup, i know we can converting hex to rgb with python. just asking cause really exciting!

Thanks in advance!

andfanilo commented 3 years ago

Hi @muhammadAgfian96, loving your enthusiasm :)

What I'm sending back to Streamlit is the raw output of the Javascript library I'm using underneath, and I don't think I have an easy control on how to export the path color. I think you'll be much faster by converting on the Python side than me on the JS side, so I'd rather go with your solution.

I'd be grateful if you could post a small snippet of the color conversion in the issue btw so other users can refer to it if necessary.

Have a nice day! Fanilo

muhammadAgfian96 commented 3 years ago

ah i see, thanks for your response!