更改matlab主题

  小宇还是比较喜欢黑色风格的编程界面,包括PYcharm以及VScode均内置了各种风格的主题或者背景,今天讨论一下关于matlab如何更改主题以及风格的方格

  实际上通过matlab<预设><颜色>也可以实现对matlab界面颜色风格的修改,但是在实际操作过程中,并不是想象的那样,因为需要非常繁琐的颜色的搭配才能使得代码可以清楚的显示出出来,因为我们知道三原色原理,不同的颜色的叠加会形成新的颜色。可以参考如下

 

  今天分享一种干脆直接的方法,通过修改matlab中的prefdir文件直接对背景进行修改,而且是相关领域的大神已经设置好的颜色的搭配,跟我来操作吧。

1、首先打开matlab,在“命令行”窗口输入“prefdir”可以得到prefdir文件所在的位置

 

 

2、将matlab所在的环境改为 C:\Users\6\AppData\Roaming\MathWorks\MATLAB\R2016b,在该文件夹下找到 matlab.prf 文件双击打开

 

 

3、将如下代码复制到该文件中

 

# monokai - MATLAB color scheme
# Generated with schemer_export v1.3.5, on MATLAB 8.1.0.604 (R2013a)
# Mon Apr 25 15:03:32 BST 2016
# To enable this color scheme in MATLAB use schemer_import, available at:
#     https://github.com/scottclowe/matlab-schemer
#     https://www.mathworks.com/matlabcentral/fileexchange/53862-matlab-schemer
ColorsUseSystem=Bfalse
ColorsUseMLintAutoFixBackground=Btrue
Editor.VariableHighlighting.Automatic=Btrue
Editor.NonlocalVariableHighlighting=Btrue
EditorCodepadHighVisible=Btrue
EditorCodeBlockDividers=Btrue
Editorhighlight-caret-row-boolean=Bfalse
EditorRightTextLineVisible=Btrue
EditorRightTextLimitLineWidth=I1
ColorsText=C-460560
ColorsBackground=C-14211038
Colors_M_Keywords=C-448910
Colors_M_Comments=C-9080482
Colors_M_Strings=C-1647756
Colors_M_UnterminatedStrings=C-65536
Colors_M_SystemCommands=C-16711936
Colors_M_Errors=C-65536
Colors_HTML_HTMLLinks=C-16711681
Colors_M_Warnings=C-27648
ColorsMLintAutoFixBackground=C-11974594
Editor.VariableHighlighting.Color=C-10066330
Editor.NonlocalVariableHighlighting.TextColor=C-16729641
Editorhighlight-lines=C-13421773
Editorhighlight-caret-row-boolean-color=C-10066330
EditorRightTextLimitLineColor=C-3355444
Color_CmdWinWarnings=C-26368

 

4、关闭界面,重新打开即可

 

 

 

  本次介绍的是 monokai ,还有其他样式的背景,其 prf 代码 参考网址 https://github.com/scottclowe/matlab-schemer/tree/master/schemes .

猜你喜欢

转载自www.cnblogs.com/-wawcc/p/12737105.html
今日推荐