2
2
How can I change the MySQL Workbench editor background color? It seems to always be white. I am using Workbench version 6.3.7.
Beware: There are other Stack posts out there with descriptors on how to do this, but the ones I tried didn't work. And in fact, some instructions are obsolete and no longer have the XML style elements that previous versions had.
I am looking in code_editor.xml (on my PC this lives here: C:\Program Files\MySQL\MySQL Workbench 6.3 CE\data), and I see interesting sections such as:
<style id="1" fore-color="#008C3A" /> <!-- SCE_MYSQL_COMMENT -->
<style id="2" fore-color="#008C3A" /> <!-- SCE_MYSQL_COMMENTLINE -->
<style id="21" fore-color="#F77B09" back-color="#F0F0F0" /> <!-- SCE_MYSQL_HIDDENCOMMAND -->
<style id="3" fore-color="#A58E37" /> <!-- SCE_MYSQL_VARIABLE -->
<style id="4" fore-color="#A58E37" /> <!-- SCE_MYSQL_SYSTEMVARIABLE -->
<style id="5" fore-color="#A58E37" /> <!-- SCE_MYSQL_KNOWNSYSTEMVARIABLE -->
<style id="6" fore-color="#000000" /> <!-- SCE_MYSQL_NUMBER -->
<style id="12" fore-color="#FF0000" /> <!-- SCE_MYSQL_SQSTRING -->
<style id="13" fore-color="#FF0000" /> <!-- SCE_MYSQL_DQSTRING -->
<style id="7" fore-color="#0101BD" bold="Yes" /> <!-- SCE_MYSQL_MAJORKEYWORD -->
<style id="8" fore-color="#0101BD" bold="Yes"/> <!-- SCE_MYSQL_KEYWORD -->
<style id="15" fore-color="#0101BD" /> <!-- SCE_MYSQL_FUNCTION -->
<style id="10" fore-color="#C04000" bold="Yes" /> <!-- SCE_MYSQL_PROCEDUREKEYWORD -->
<style id="14" bold="Yes" /> <!-- SCE_MYSQL_OPERATOR -->
<style id="16" fore-color="#000000" /> <!-- SCE_MYSQL_IDENTIFIER -->
<style id="17" fore-color="#7D5A27" /> <!-- SCE_MYSQL_QUOTEDIDENTIFIER -->
<style id="22" fore-color="#FFFFFF" back-color="#A0A0A0" bold="Yes" /> <!-- SCE_MYSQL_PLACEHOLDER -->
<style id="18" fore-color="#007F00" /> <!-- SCE_MYSQL_USER1 -->
<!-- All styles again in their variant in a hidden command (with a 0x40 offset). -->
<style id="65" fore-color="#A0A0A0" back-color="#F0F0F0" /> <!-- SCE_MYSQL_COMMENT -->
<style id="66" fore-color="#A0A0A0" back-color="#F0F0F0" /> <!-- SCE_MYSQL_COMMENTLINE -->
<style id="67" fore-color="#A58E37" back-color="#F0F0F0" /> <!-- SCE_MYSQL_VARIABLE -->
<style id="68" fore-color="#A58E37" back-color="#F0F0F0" /> <!-- SCE_MYSQL_SYSTEMVARIABLE -->
<style id="69" fore-color="#A58E37" back-color="#F0F0F0" /> <!-- SCE_MYSQL_KNOWNSYSTEMVARIABLE -->
<style id="70" fore-color="#F0A030" back-color="#F0F0F0" /> <!-- SCE_MYSQL_NUMBER -->
<style id="76" fore-color="#209F20" back-color="#F0F0F0" /> <!-- SCE_MYSQL_SQSTRING -->
<style id="77" fore-color="#6D4A27" back-color="#F0F0F0" /> <!-- SCE_MYSQL_DQSTRING -->
<style id="71" fore-color="#007FBF" back-color="#F0F0F0" bold="Yes" /> <!-- SCE_MYSQL_MAJORKEYWORD -->
<style id="72" fore-color="#007FBF" back-color="#F0F0F0" bold="Yes"/> <!-- SCE_MYSQL_KEYWORD -->
<style id="79" fore-color="#C040C0" back-color="#F0F0F0" /> <!-- SCE_MYSQL_FUNCTION -->
<style id="74" fore-color="#C04000" back-color="#F0F0F0" bold="Yes" /> <!-- SCE_MYSQL_PROCEDUREKEYWORD -->
<style id="78" back-color="#F0F0F0" bold="Yes" /> <!-- SCE_MYSQL_OPERATOR -->
<style id="80" fore-color="#000000" back-color="#F0F0F0" /> <!-- SCE_MYSQL_IDENTIFIER -->
<style id="81" fore-color="#7D5A27" back-color="#F0F0F0" /> <!-- SCE_MYSQL_QUOTEDIDENTIFIER -->
<style id="86" fore-color="#FFFFFF" back-color="#A0A0A0" bold="Yes" /> <!-- SCE_MYSQL_PLACEHOLDER -->
<style id="82" fore-color="#007F00" /> <!-- SCE_MYSQL_USER1 -->
But I can't figure out which of these (if any) will simply change the query editor background color. Thanks in advance.
mabagu, there was no element in my
code_editor.xml
with an id of 32, so I added it and it worked. Nice! But the background color of all the lines containing text (not line numbers) is still white. How can I change all those? I tried changing the back-color hex codes of all I could find, but that did nothing; no change. – HerrimanCoder – 2016-07-28T04:24:59.753The background color of all the lines containing text (not line numbers) was still white. So I added back-color="#E3DDBF" on every single element, and that colorized 99% of the text line space as desired. BUT I still have white background behind special chars like *, =, %, etc. Any idea how to change those? (Why does Workbench make this so difficult?) – HerrimanCoder – 2016-07-28T04:38:11.060
id 14 (SCE_MYSQL_OPERATOR) is working for me to change the background on those special chars – mabagu – 2016-07-28T05:00:44.040