Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a ColorPicker demo #1870

Closed
wants to merge 1 commit into from
Closed

Conversation

Zengyf-CVer
Copy link
Contributor

Description

I created a demo that randomly generates dark or light colors based on the ColorPicker component. The following is a demonstration of this demo:
https://huggingface.co/spaces/Zengyf-CVer/Color_Switch

Checklist:

  • I have performed a self-review of my own code
  • My code follows the style guidelines of this project
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@abidlabs
Copy link
Member

Hi @Zengyf-CVer, thanks for the contribution! Happy to add the demo to the gradio repo, but I'd like to make some suggestions:

  • First, we have each demo in a separate folder in a file called run.py. It's important that each demo follows this pattern so that we can load them correctly on the website. Can you move the demo to a separate folder? I would suggest naming the folder something like color_generator and putting your code in a run.py file inside of the folder
  • Second, please add this demo to the ColorPicker component's documentation here:

Demos: color_picker

  • As far as the demo itself, it looks good. I would suggest also including a Textbox output that shows the color that is generated as a hexadecimal string

@Zengyf-CVer
Copy link
Contributor Author

@abidlabs Thanks for your suggestion, I will seriously revise it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants