MySQL Workbench 深色主题

Posted

技术标签:

【中文标题】MySQL Workbench 深色主题【英文标题】:MySQL Workbench Dark Theme 【发布时间】:2013-06-23 21:46:29 【问题描述】:

如何更改 mysql Workbench 设置以使其使用深色主题?

【问题讨论】:

欢迎来到 ***。你会发现这个社区通常很有帮助。请务必阅读有关如何发布问题、接受答案、使用 cmets 等所有内容的常见问题解答。 【参考方案1】:

您可以使用默认值禁用 MySQL WorkBench 暗模式 - 在终端/控制台上运行以下命令。

默认写入 com.oracle.workbench.MySQLWorkbench NSRequiresAquaSystemAppearance -bool 是


【讨论】:

我正在寻找如何仅为 Mysql Workbench 禁用暗模式,但在此处找不到它。我跑了这个,它奏效了。谢谢!。 非常感谢!很有帮助! 顺便说一句,与-bool no 相同的cmd 再次打开主题! 谢谢,这真的很有帮助。黑暗的主题让一切变得难以理解,而且对比鲜明。 我不会对此表示赞同,因为它与问题无关,但我很感激它解决了我的问题。谢谢。 :D【参考方案2】:

对于更直接的 Windows 答案。只需将 code_editor.xml 文件替换为此处的文件:https://github.com/mleandrojr/mysql-workbench-dark-theme。它并不完美,但查询窗口现在是黑暗的。

【讨论】:

【参考方案3】:

VSingh 的破解总比没有好。

然而,Visual Studio Code 有一个 cweijan 可以通过的 mySQL 插件,它确实支持深色主题(实际上有几个)。它几乎可以完成您可能需要的一切,只需一点学习曲线即可了解新界面。它还支持我使用的其他几个数据库引擎,所以它很快就成为了我的一员。

我厌倦了每次必须运行查询时都得到弧形眼睛,这让我很头疼。他们在 Mac 上实现了它,在 Windows 上做同样的事情需要多长时间?

从现在开始,我将尽可能多地使用 VS Code,也许我会在开发人员醒来时再看看这个。

【讨论】:

【参考方案4】:

对于 Ubuntu 用户,code_editor.xml

/usr/share/mysql-workbench/data

根据需要编辑,在必须需要的 Ubuntu 中,某些默认使用的颜色缺乏对比度并且无法读取, 您也可以使用此solution 快速解决方法。

访问this repo 获取完整的 XML 文件。

【讨论】:

推荐的 repo xml 文件为我解决了它(Ubuntu 20.04)。我的眼睛非常感谢你!【参考方案5】:

以下是如何更改 MySQL Workbench 的颜色(包括背景颜色)。

打开位于 MySQL Workbench 安装目录(通常为 C:\Program Files\MySQL\MySQL Workbench 6.3 CE\data)的 data 文件夹中名为 code_editor.xml 的 XML 文件。在这里,您会发现很多不同代码元素的样式,但也有一些缺失。

MySQL Workbench 使用 scintilla 作为代码编辑器,并且 scintilla 定义了更多可以在 code_editor.xml 文件中使用的样式。用于背景颜色的是样式 id 32

这是 MySQL 的完整列表(scintilla 有多种语言的数千种样式)和我的配置:

<style id= "0" fore-color="#DDDDDD" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_DEFAULT                  -->
<style id= "1" fore-color="#999999" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_COMMENT                  -->
<style id= "2" fore-color="#999999" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_COMMENTLINE              -->
<style id= "3" fore-color="#DDDDDD" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_VARIABLE                 -->
<style id= "4" fore-color="#9B859D" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_SYSTEMVARIABLE           -->
<style id= "5" fore-color="#9B859D" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_KNOWNSYSTEMVARIABLE      -->
<style id= "6" fore-color="#FF8080" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_NUMBER                   -->
<style id= "7" fore-color="#7AAAD7" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_MAJORKEYWORD             -->
<style id= "8" fore-color="#7AAAD7" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_KEYWORD                  -->
<style id= "9" fore-color="#9B859D" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_DATABASEOBJECT           -->
<style id="10" fore-color="#DDDDDD" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_PROCEDUREKEYWORD         -->
<style id="11" fore-color="#B9CB89" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_STRING                   -->
<style id="12" fore-color="#B9CB89" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_SQSTRING                 -->
<style id="13" fore-color="#B9CB89" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_DQSTRING                 -->
<style id="14" fore-color="#FFBB80" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_OPERATOR                 -->
<style id="15" fore-color="#9B859D" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_FUNCTION                 -->
<style id="16" fore-color="#DDDDDD" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_IDENTIFIER               -->
<style id="17" fore-color="#B9CB89" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_QUOTEDIDENTIFIER         -->
<style id="18" fore-color="#B9CB89" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_USER1                    -->
<style id="19" fore-color="#B9CB89" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_USER2                    -->
<style id="20" fore-color="#B9CB89" back-color="#2A2A2A" bold="No" />   <!-- SCE_MYSQL_USER3                    -->
<style id="21" fore-color="#FFBB80" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_HIDDENCOMMAND            -->
<style id="22" fore-color="#909090" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_PLACEHOLDER              -->

<!-- These two are for scintilla globally. -->
<style id="32" fore-color="#DDDDDD" back-color="#2A2A2A" bold="No" />   <!-- STYLE_DEFAULT                      THIS IS THE ONE FOR THE BACKGROUND!!!!! -->
<style id="33" fore-color="#2A2A2A" back-color="#DDDDDD" bold="No" />   <!-- STYLE_LINENUMBER                   -->

<!-- All styles again in their variant in a hidden command (with a 0x40 offset). -->
<style id="65" fore-color="#999999" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_COMMENT                  -->
<style id="66" fore-color="#999999" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_COMMENTLINE              -->
<style id="67" fore-color="#DDDDDD" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_VARIABLE                 -->
<style id="68" fore-color="#9B859D" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_SYSTEMVARIABLE           -->
<style id="69" fore-color="#9B859D" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_KNOWNSYSTEMVARIABLE      -->
<style id="70" fore-color="#FF8080" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_NUMBER                   -->
<style id="71" fore-color="#7AAAD7" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_MAJORKEYWORD             -->
<style id="72" fore-color="#7AAAD7" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_KEYWORD                  -->
<style id="73" fore-color="#9B859D" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_DATABASEOBJECT           -->
<style id="74" fore-color="#DDDDDD" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_PROCEDUREKEYWORD         -->
<style id="75" fore-color="#B9CB89" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_STRING                   -->
<style id="76" fore-color="#B9CB89" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_SQSTRING                 -->
<style id="77" fore-color="#B9CB89" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_DQSTRING                 -->
<style id="78" fore-color="#FFBB80" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_OPERATOR                 -->
<style id="79" fore-color="#9B859D" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_FUNCTION                 -->
<style id="80" fore-color="#DDDDDD" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_IDENTIFIER               -->
<style id="81" fore-color="#B9CB89" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_QUOTEDIDENTIFIER         -->
<style id="82" fore-color="#B9CB89" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_USER1                    -->
<style id="83" fore-color="#B9CB89" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_USER2                    -->
<style id="84" fore-color="#B9CB89" back-color="#707070" bold="No" />   <!-- SCE_MYSQL_USER3                    -->
<style id="85" fore-color="#FFBB80" back-color="#909090" bold="No" />   <!-- SCE_MYSQL_HIDDENCOMMAND            -->
<style id="86" fore-color="#AAAAAA" back-color="#909090" bold="No" />   <!-- SCE_MYSQL_PLACEHOLDER              -->

【讨论】:

如果遇到问题,请务必将这些样式粘贴到&lt;language name="SCLEX_MYSQL"&gt; 节点中,而不是文件末尾。 Mac用户,code_editor.xml文件在MBP HD/ Applications/MySQLWorkbench.app/Contents/Resources/data/ 这只会改变我的文本编辑器...有没有办法将 IDE 面板和工具栏也更改为深色主题? 这成功为我更改了字体颜色,但编辑器背景颜色仍然是白色。其他人经历过这种情况,或者有解决方案的想法吗?谢谢! 在 Windows 上的 v8.0.16 中对我不起作用。我替换了标签&lt;language name="SCLEX_MYSQL"&gt;中的样式并尝试了所有主题但没有运气【参考方案6】:

MySQL Workbench 8.0 更新

根据 Gunther 的回答,code_editor.xml 似乎他们计划在以后的某个时候启用暗模式。曾经的 fore-color 现在已拆分为 fore-color-lightfore-color-darkback-color 也是如此。

以下是如何根据 elMestre 慷慨提供的 Monokai 颜色获得深色 编辑器(不是整个应用程序主题):

<!-- 
dark-gray:         #282828;
brown-gray:        #49483E;
gray:              #888888;
light-gray:        #CCCCCC;
ghost-white:       #F8F8F0;
light-ghost-white: #F8F8F2;
yellow:            #E6DB74;
blue:              #66D9EF;
pink:              #F92672;
purple:            #AE81FF;
brown:             #75715E;
orange:            #FD971F;
light-orange:      #FFD569;
green:             #A6E22E;
sea-green:         #529B2F; 
-->

<style id="32" fore-color-light="#DDDDDD" back-color-light="#282828" fore-color-dark="#DDDDDD" back-color-dark="#282828" bold="No" />   <!-- STYLE_DEFAULT       !BACKGROUND!   -->
<style id="33" fore-color-light="#DDDDDD" back-color-light="#282828" fore-color-dark="#DDDDDD" back-color-dark="#282828" bold="No" />   <!-- STYLE_LINENUMBER                   -->
<style id= "0" fore-color-light="#DDDDDD" back-color-light="#282828" fore-color-dark="#DDDDDD" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_DEFAULT                  -->

<style id= "1" fore-color-light="#999999" back-color-light="#282828" fore-color-dark="#999999" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_COMMENT                  -->
<style id= "2" fore-color-light="#999999" back-color-light="#282828" fore-color-dark="#999999" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_COMMENTLINE              -->
<style id= "3" fore-color-light="#DDDDDD" back-color-light="#282828" fore-color-dark="#DDDDDD" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_VARIABLE                 -->
<style id= "4" fore-color-light="#66D9EF" back-color-light="#282828" fore-color-dark="#66D9EF" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_SYSTEMVARIABLE           -->
<style id= "5" fore-color-light="#66D9EF" back-color-light="#282828" fore-color-dark="#66D9EF" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_KNOWNSYSTEMVARIABLE      -->
<style id= "6" fore-color-light="#AE81FF" back-color-light="#282828" fore-color-dark="#AE81FF" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_NUMBER                   -->
<style id= "7" fore-color-light="#F92672" back-color-light="#282828" fore-color-dark="#F92672" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_MAJORKEYWORD             -->
<style id= "8" fore-color-light="#F92672" back-color-light="#282828" fore-color-dark="#F92672" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_KEYWORD                  -->
<style id= "9" fore-color-light="#9B859D" back-color-light="#282828" fore-color-dark="#9B859D" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_DATABASEOBJECT           -->
<style id="10" fore-color-light="#DDDDDD" back-color-light="#282828" fore-color-dark="#DDDDDD" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_PROCEDUREKEYWORD         -->
<style id="11" fore-color-light="#E6DB74" back-color-light="#282828" fore-color-dark="#E6DB74" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_STRING                   -->
<style id="12" fore-color-light="#E6DB74" back-color-light="#282828" fore-color-dark="#E6DB74" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_SQSTRING                 -->
<style id="13" fore-color-light="#E6DB74" back-color-light="#282828" fore-color-dark="#E6DB74" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_DQSTRING                 -->
<style id="14" fore-color-light="#F92672" back-color-light="#282828" fore-color-dark="#F92672" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_OPERATOR                 -->
<style id="15" fore-color-light="#9B859D" back-color-light="#282828" fore-color-dark="#9B859D" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_FUNCTION                 -->
<style id="16" fore-color-light="#DDDDDD" back-color-light="#282828" fore-color-dark="#DDDDDD" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_IDENTIFIER               -->
<style id="17" fore-color-light="#E6DB74" back-color-light="#282828" fore-color-dark="#E6DB74" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_QUOTEDIDENTIFIER         -->
<style id="18" fore-color-light="#529B2F" back-color-light="#282828" fore-color-dark="#529B2F" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_USER1                    -->
<style id="19" fore-color-light="#529B2F" back-color-light="#282828" fore-color-dark="#529B2F" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_USER2                    -->
<style id="20" fore-color-light="#529B2F" back-color-light="#282828" fore-color-dark="#529B2F" back-color-dark="#282828" bold="No" />   <!-- SCE_MYSQL_USER3                    -->
<style id="21" fore-color-light="#66D9EF" back-color-light="#49483E" fore-color-dark="#66D9EF" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_HIDDENCOMMAND            -->
<style id="22" fore-color-light="#909090" back-color-light="#49483E" fore-color-dark="#909090" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_PLACEHOLDER              -->
<!-- All styles again in their variant in a hidden command -->
<style id="65" fore-color-light="#999999" back-color-light="#49483E" fore-color-dark="#999999" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_COMMENT                  -->
<style id="66" fore-color-light="#999999" back-color-light="#49483E" fore-color-dark="#999999" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_COMMENTLINE              -->
<style id="67" fore-color-light="#DDDDDD" back-color-light="#49483E" fore-color-dark="#DDDDDD" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_VARIABLE                 -->
<style id="68" fore-color-light="#66D9EF" back-color-light="#49483E" fore-color-dark="#66D9EF" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_SYSTEMVARIABLE           -->
<style id="69" fore-color-light="#66D9EF" back-color-light="#49483E" fore-color-dark="#66D9EF" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_KNOWNSYSTEMVARIABLE      -->
<style id="70" fore-color-light="#AE81FF" back-color-light="#49483E" fore-color-dark="#AE81FF" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_NUMBER                   -->
<style id="71" fore-color-light="#F92672" back-color-light="#49483E" fore-color-dark="#F92672" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_MAJORKEYWORD             -->
<style id="72" fore-color-light="#F92672" back-color-light="#49483E" fore-color-dark="#F92672" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_KEYWORD                  -->
<style id="73" fore-color-light="#9B859D" back-color-light="#49483E" fore-color-dark="#9B859D" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_DATABASEOBJECT           -->
<style id="74" fore-color-light="#DDDDDD" back-color-light="#49483E" fore-color-dark="#DDDDDD" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_PROCEDUREKEYWORD         -->
<style id="75" fore-color-light="#E6DB74" back-color-light="#49483E" fore-color-dark="#E6DB74" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_STRING                   -->
<style id="76" fore-color-light="#E6DB74" back-color-light="#49483E" fore-color-dark="#E6DB74" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_SQSTRING                 -->
<style id="77" fore-color-light="#E6DB74" back-color-light="#49483E" fore-color-dark="#E6DB74" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_DQSTRING                 -->
<style id="78" fore-color-light="#F92672" back-color-light="#49483E" fore-color-dark="#F92672" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_OPERATOR                 -->
<style id="79" fore-color-light="#9B859D" back-color-light="#49483E" fore-color-dark="#9B859D" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_FUNCTION                 -->
<style id="80" fore-color-light="#DDDDDD" back-color-light="#49483E" fore-color-dark="#DDDDDD" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_IDENTIFIER               -->
<style id="81" fore-color-light="#E6DB74" back-color-light="#49483E" fore-color-dark="#E6DB74" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_QUOTEDIDENTIFIER         -->
<style id="82" fore-color-light="#529B2F" back-color-light="#49483E" fore-color-dark="#529B2F" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_USER1                    -->
<style id="83" fore-color-light="#529B2F" back-color-light="#49483E" fore-color-dark="#529B2F" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_USER2                    -->
<style id="84" fore-color-light="#529B2F" back-color-light="#49483E" fore-color-dark="#529B2F" back-color-dark="#49483E" bold="No" />   <!-- SCE_MYSQL_USER3                    -->
<style id="85" fore-color-light="#66D9EF" back-color-light="#888888" fore-color-dark="#66D9EF" back-color-dark="#888888" bold="No" />   <!-- SCE_MYSQL_HIDDENCOMMAND            -->
<style id="86" fore-color-light="#AAAAAA" back-color-light="#888888" fore-color-dark="#AAAAAA" back-color-dark="#888888" bold="No" />   <!-- SCE_MYSQL_PLACEHOLDER              -->  

记得将所有这些样式粘贴到data &gt; code_editor.xml 中的&lt;language name="SCLEX_MYSQL"&gt; 标记内。

【讨论】:

等等,你只是将这些粘贴到 。你粘贴到那个 ?因为我这样做了,当我重新打开 Workbench 时它没有任何区别. Workbench GUI 中是否还有其他地方需要我去查看和选择主题?除了在“编辑->首选项->字体和颜色等等,你只是将这些粘贴到 。你粘贴到那个 ?因为我这样做了,当我重新打开 Workbench 时它没有任何区别. Workbench GUI 中是否还有其他地方需要我去查看和选择主题?除了在“编辑->首选项->字体和颜色@VSingh 好的,我知道了,但是我每次输入时都有白色背景。我的文字被白色包围,而不是被文字遮住。 我打算更新我的帖子以获取该版本,但您已经这样做了,而且效果很好。谢谢大佬。 @VSingh - 非常感谢!那是一个很酷的技巧。编辑完xml文件后,我的sql编辑器窗口变暗了。【参考方案7】:

编辑: 建议:这个答案很旧,可以在同一页面中找到更好的解决方案。这个答案提到了 MySQL Workbench 6.3 并且已经过时了。如果您使用的是新版本(今天为 8.0),请在此页面中查找 @VSingh 评论。


原答案:

只是 Gaston 答案的副本,但带有 Monokai 主题颜色。

<!-- 
    dark-gray:         #282828;
    brown-gray:        #49483E;
    gray:              #888888;
    light-gray:        #CCCCCC;
    ghost-white:       #F8F8F0;
    light-ghost-white: #F8F8F2;
    yellow:            #E6DB74;
    blue:              #66D9EF;
    pink:              #F92672;
    purple:            #AE81FF;
    brown:             #75715E;
    orange:            #FD971F;
    light-orange:      #FFD569;
    green:             #A6E22E;
    sea-green:         #529B2F; 
-->
<style id="32" fore-color="#DDDDDD" back-color="#282828" bold="No" />   <!-- STYLE_DEFAULT       !BACKGROUND!   -->
<style id="33" fore-color="#DDDDDD" back-color="#282828" bold="No" />   <!-- STYLE_LINENUMBER                   -->
<style id= "0" fore-color="#DDDDDD" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_DEFAULT                  -->
<style id= "1" fore-color="#999999" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_COMMENT                  -->
<style id= "2" fore-color="#999999" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_COMMENTLINE              -->
<style id= "3" fore-color="#DDDDDD" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_VARIABLE                 -->
<style id= "4" fore-color="#66D9EF" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_SYSTEMVARIABLE           -->
<style id= "5" fore-color="#66D9EF" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_KNOWNSYSTEMVARIABLE      -->
<style id= "6" fore-color="#AE81FF" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_NUMBER                   -->
<style id= "7" fore-color="#F92672" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_MAJORKEYWORD             -->
<style id= "8" fore-color="#F92672" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_KEYWORD                  -->
<style id= "9" fore-color="#9B859D" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_DATABASEOBJECT           -->
<style id="10" fore-color="#DDDDDD" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_PROCEDUREKEYWORD         -->
<style id="11" fore-color="#E6DB74" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_STRING                   -->
<style id="12" fore-color="#E6DB74" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_SQSTRING                 -->
<style id="13" fore-color="#E6DB74" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_DQSTRING                 -->
<style id="14" fore-color="#F92672" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_OPERATOR                 -->
<style id="15" fore-color="#9B859D" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_FUNCTION                 -->
<style id="16" fore-color="#DDDDDD" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_IDENTIFIER               -->
<style id="17" fore-color="#E6DB74" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_QUOTEDIDENTIFIER         -->
<style id="18" fore-color="#529B2F" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_USER1                    -->
<style id="19" fore-color="#529B2F" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_USER2                    -->
<style id="20" fore-color="#529B2F" back-color="#282828" bold="No" />   <!-- SCE_MYSQL_USER3                    -->
<style id="21" fore-color="#66D9EF" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_HIDDENCOMMAND            -->
<style id="22" fore-color="#909090" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_PLACEHOLDER              -->
<!-- All styles again in their variant in a hidden command -->
<style id="65" fore-color="#999999" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_COMMENT                  -->
<style id="66" fore-color="#999999" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_COMMENTLINE              -->
<style id="67" fore-color="#DDDDDD" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_VARIABLE                 -->
<style id="68" fore-color="#66D9EF" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_SYSTEMVARIABLE           -->
<style id="69" fore-color="#66D9EF" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_KNOWNSYSTEMVARIABLE      -->
<style id="70" fore-color="#AE81FF" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_NUMBER                   -->
<style id="71" fore-color="#F92672" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_MAJORKEYWORD             -->
<style id="72" fore-color="#F92672" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_KEYWORD                  -->
<style id="73" fore-color="#9B859D" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_DATABASEOBJECT           -->
<style id="74" fore-color="#DDDDDD" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_PROCEDUREKEYWORD         -->
<style id="75" fore-color="#E6DB74" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_STRING                   -->
<style id="76" fore-color="#E6DB74" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_SQSTRING                 -->
<style id="77" fore-color="#E6DB74" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_DQSTRING                 -->
<style id="78" fore-color="#F92672" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_OPERATOR                 -->
<style id="79" fore-color="#9B859D" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_FUNCTION                 -->
<style id="80" fore-color="#DDDDDD" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_IDENTIFIER               -->
<style id="81" fore-color="#E6DB74" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_QUOTEDIDENTIFIER         -->
<style id="82" fore-color="#529B2F" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_USER1                    -->
<style id="83" fore-color="#529B2F" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_USER2                    -->
<style id="84" fore-color="#529B2F" back-color="#49483E" bold="No" />   <!-- SCE_MYSQL_USER3                    -->
<style id="85" fore-color="#66D9EF" back-color="#888888" bold="No" />   <!-- SCE_MYSQL_HIDDENCOMMAND            -->
<style id="86" fore-color="#AAAAAA" back-color="#888888" bold="No" />   <!-- SCE_MYSQL_PLACEHOLDER              -->

【讨论】:

等等,你只是将这些粘贴到 。你粘贴到那个 ?因为我这样做了,当我重新打开 Workbench 时它没有任何区别. Workbench GUI 中是否还有其他地方需要我去查看和选择主题?除了在“编辑->首选项->字体和颜色等等,你只是将这些粘贴到 。你粘贴到那个 ?因为我这样做了,当我重新打开 Workbench 时它没有任何区别. Workbench GUI 中是否还有其他地方需要我去查看并选择一个主题?除了在“编辑->首选项->字体和颜色我在这里缺少什么@elMestre 好的,我知道了,但是我每次输入时都有白色背景。我的文字被白色包围,而不是用文字@elMestre 拜托,这是 6.3 版的。现在使用@VSingh 回答【参考方案8】:

在 mac 上禁用 MySQL 工作台中的暗模式: 打开终端使用提到的命令:

默认写入 com.oracle.workbench.MySQLWorkbench NSRequiresAquaSystemAppearance -bool 是

在 Mac 上的 MySQL 工作台中启用暗模式: 打开终端:

默认写入 com.oracle.workbench.MySQLWorkbench NSRequiresAquaSystemAppearance -bool no

【讨论】:

最佳答案。简单快速。【参考方案9】:

仅供参考,Dark 主题现在在 MySQL Workbench 的开发版中

更新:据我所知,它是原生内置于 MySQL Workbench 8.0.15 for MAC OS X

我下载的包是mysql-workbench-community-8.0.15-macos-x86_64.dmg

https://dev.mysql.com/downloads/workbench/

【讨论】:

如何启用?设置在哪里? 啊,但不适用于 windows :( 它需要切换到 MacOS 系统范围的暗模式。似乎没有办法独立切换 MySQL Workbench 暗模式。 Mac:System Preferences &gt; General &gt; Appearance 这个答案真的让我充满希望。重新安装和摆弄偏好 30 分钟,直到那时我才读到关于它只是 MacOS 的 cmets。 2 年过去了,Windows 上仍然没有黑暗主题 :(【参考方案10】:

引用瑜伽...

对于 Mac 用户,code_editor.xml 文件位于 MBP HD/Applications/MySQLWorkbench.app/Contents/Resources/data/ 中

我刚刚通过目瞪口呆的实验(即我尝试的第一件事,工作)发现,如果我将 那个 文件复制到...

/Users/your.username/Library/Application Support/MySQL/Workbench/code_editor.xml

...然后在那里编辑它,它确实会覆盖。刚刚在 Mac OS X Sierra 和 MySQL Workbench 6.3 上完美运行。

【讨论】:

【参考方案11】:

这不是一个真正的编程问题,但它是一个快速的问题,所以让我来回答一下。 MySQL Workbench 的主题是应用程序某些主要部分的颜色集合。计划允许在以后的版本中自定义它们。为了获得一个黑暗主题作为模板之一,请在http://bugs.mysql.com 提交功能请求。但请记住,并非每个 UI 元素都根据 Workbench 主题着色,例如文本框仍然保持白色,因为它们使用 Windows 标准颜色。

【讨论】:

这可以。我正在更改工作区中的大部分白色背景。谢谢。 没有深色主题,但我添加了高对比度主题。将您的系统设置为暗色,以使大多数窗口使用深色背景。

以上是关于MySQL Workbench 深色主题的主要内容,如果未能解决你的问题,请参考以下文章

Mysql Workbench No Object Selected!

如何在 VSCode 用户设置中为深色和浅色主题指定颜色

如何将 MySQL 表从 PhpMyAdmin 复制到不同系统中的 MySQL Workbench?

HG Workbench工作目录超过ssh?

Apache iotdb-web-workbench 认证绕过漏洞(CVE-2023-24829)

UITableView 深色主题