Skip to content
New issue

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

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

Already on GitHub? # to your account

最新暗黑色主题界面如何配置? #173

Closed
substitute5 opened this issue Mar 30, 2023 · 6 comments
Closed

最新暗黑色主题界面如何配置? #173

substitute5 opened this issue Mar 30, 2023 · 6 comments
Labels
documentation Improvements or additions to documentation high value issue

Comments

@substitute5
Copy link

我拉取了最新的代码运行,界面仍旧是之前的风格,想要知道如何实现暗黑主题风格的配置,谢谢。

@benlw
Copy link

benlw commented Mar 30, 2023

或许是系统/浏览器的效果, 代码里没有暗黑相关的设定

@wangfeng35
Copy link

同是白的

@ifyz
Copy link
Contributor

ifyz commented Mar 30, 2023

修改theme.py的30行
Gradio 带有一组预构建的主题:
gr.themes.Base()
gr.themes.Default()
gr.themes.Glass()
gr.themes.Monochrome()
gr.themes.Soft()

@binary-husky binary-husky added documentation Improvements or additions to documentation high value issue labels Mar 31, 2023
@houjie8888
Copy link

@ifyz 你好,预设的主题没有暗黑风格,请问如何修改让他变成暗黑风格呢,set_theme.set()中哪个属性是控制背景颜色的呀

@binary-husky
Copy link
Owner

binary-husky commented Apr 2, 2023

我是把浏览器调节到暗色模式

在浏览器url后面添加/?__dark-theme=true可以切换dark主题

@binary-husky
Copy link
Owner

binary-husky commented Apr 2, 2023

在浏览器url后面添加/?__dark-theme=true可以切换dark主题
例如 http://localhost:7860 变成 http://localhost:7860/?__theme=dark

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
documentation Improvements or additions to documentation high value issue
Projects
None yet
Development

No branches or pull requests

6 participants