修改Matlab主题的几种方式

1. Matlab 预设(设置)里修改

修改Matlab的背景颜色

2. 覆盖prefdir文件

在Matlab命令行窗口中运行 prefdir,matlab就会显示预设文件(matlab.prf)的位置
在这里插入图片描述
找到该文件打开之后是这样子的

#MATLAB Preferences
#Fri Oct 16 14:18:05 CST 2020
EditorMCodeFoldEnabledfunction=Btrue
EditorCodeBlockDividers=Btrue
DelimiterOptionsTypingMisMatchType=I5
MatlabExitConfirm=Bfalse
Spreadsheet.DecimalSeparator=I46
EditorMCodeFoldCollapseFileOpenwhile=Bfalse
mlint-configurations-list=SC:\\Users\\Kearney\\AppData\\Roaming\\MathWorks\\MATLAB\\R2017b\\MLintDefaultSettings.txt
EditorMFunctionIndentType=SMixedFunctionIndent
ColorsUseSystem=Btrue
ReplaceSearchText=Sautocov_to_var
DelimiterOptionsMoving=Btrue
EditorMCodeFoldCollapseFileOpenfunction=Bfalse
Colors_HTML_HTMLLinks=C-16776961
mlint-configuration-file=SC:\\Users\\Kearney\\AppData\\Roaming\\MathWorks\\MATLAB\\R2017b\\MLintDefaultSettings.txt
ReplaceSearchText9=S
ReplaceSearchText8=S
ReplaceSearchText7=Svar
ReplaceText9=S
DataStatistics.XLocation=I20
ReplaceSearchText6=Sdata
ReplaceText8=S
ReplaceSearchText5=SA1
ReplaceText7=S
ReplaceSearchText4=Stsdata_to_autocov
ReplaceText6=S
ReplaceSearchText3=Ssdata_to_cpsd
ReplaceText5=S
EditorMCodeFoldCollapseFileOpenevents=Bfalse
ReplaceSearchText2=Stsdata_to_cpsd
ReplaceText4=S
EditorMCodeFoldEnabledspmd=Btrue
ReplaceText3=S
ReplaceText2=S
DelimiterOptionsMovingMisMatchType=I5
EditorMCodeFoldCollapseFileOpenmethods=Bfalse
WorkspaceBrowserUseNaNs=Btrue
Desktop.Font.Code2=F0 12 Monospaced
DelimiterOptionsTypingMatchType=I3
EditorMCodeFoldEnabledif=Bfalse
EditorMCodeFoldCollapseFileOpenif=Bfalse
ArrayEditorEDirection=I0
EditorMCodeFoldCollapseFileOpenfor=Bfalse
Editor.NonlocalVariableHighlighting=Btrue
EditorMCodeFoldEnabledenumeration=Btrue
RLOrderB2_WB_2014b_1=S0:1:
RLHiddenB2_WB_2014b_1=I16376
GeneralTextUseSystemFont=Btrue
DelimiterOptionsMovingMatchType=I1
Editor.Language.MATLAB.Extensions=Sm
EditorMCodeFoldEnabledfor=Btrue
EditorMCodeFoldEnabledcell=Bfalse
EditorOtherEditor=S
Editormlint-underlining=I2
EditorRightTextLimitLineColor=C-3355444
Editor.NonlocalVariableHighlighting.TextColor=C-16735325
ArrayEditorEMoves=Btrue
EditorMCodeFoldEnabledswitch=Bfalse
ReplaceSearchText20=S
EditorMCodeFoldEnabledmethods=Btrue
Colors_M_Strings=C-6283024
Colors_M_UnterminatedStrings=C-5111808
EditorMCodeFoldCollapseFileOpenhelp-comments=Bfalse
GeneralEightyColumns=Bfalse
ReplaceText20=S
ReplaceSearchText19=S
ReplaceSearchText18=S
ReplaceSearchText17=S
ReplaceSearchText16=S
ReplaceSearchText15=S
ReplaceSearchText14=S
ColorsText=C-16777216
ReplaceSearchText13=S
ReplaceSearchText12=S
ReplaceSearchText11=S
Colors_M_Comments=C-14513374
ReplaceSearchText10=S
DataStatistics.YLocation=I40
CommandWindowClearConfirmation=Btrue
ClosedToolTipPathAffordance=Bfalse
Colors_M_TypeSection=C-6270419
WorkspaceBrowserStatNumelLimit=I500000
ReplaceText19=S
ReplaceText18=S
ReplaceText17=S
ReplaceText16=S
ReplaceText15=S
ReplaceText14=S
ReplaceText13=S
ReplaceText12=S
EditorMCodeFoldEnabledclassdef=Btrue
ReplaceText11=S
ReplaceText10=S
ArrayEditor_CS_Format=I0
ColorsBackground=C-1
ColorsUseMLintAutoFixBackground=Btrue
ReplaceWholeWord=Bfalse
EditorMCodeFoldCollapseFileOpenblockcomments=Bfalse
CommandWindowShowStartupMessage=Bfalse
Color_CmdWinErrors=C-1703936
GeneralNumDisplay=Sloose
EditorCodepadHighVisible=Btrue
ReplaceMatchCase=Bfalse
EditorMCodeFoldCollapseFileOpenspmd=Bfalse
EditorMCodeFoldEnabledhelp-comments=Btrue
EditorMCodeFoldCollapseFileOpenswitch=Bfalse
LimitSearchToSelection=Bfalse
RLWidthB2_WB_2014b_1_1=I130
Colors_M_SystemCommands=C-5075968
RLWidthB2_WB_2014b_1_0=I130
EditorMCodeFoldCollapseFileOpenclassdef=Bfalse
EditorMCodeFoldEnabledblockcomments=Btrue
Colors_M_Errors=C-65536
GeneralUseToolboxCacheDiag=Bfalse
EditorMRU8=SD:\\Program Files\\MATLAB\\R2017b\\toolbox\\MVGC1-1.0\\demo\\var9_test.m
ReplaceWordWrap=Btrue
EditorMRU7=SD:\\Program Files\\MATLAB\\R2017b\\toolbox\\MVGC1-1.0\\demo\\var5_test.m
EditorMRU6=SD:\\Program Files\\MATLAB\\R2017b\\toolbox\\MVGC1-1.0\\core\\tsdata_to_infocrit.m
EditorMRU5=SD:\\Program Files\\MATLAB\\R2017b\\toolbox\\MVGC1-1.0\\core\\var_to_tsdata.m
EditorMRU4=SD:\\Program Files\\MATLAB\\R2017b\\toolbox\\MVGC1-1.0\\demo\\mvgc_demo_bootstrap.m
EditorMRU3=SD:\\Downloads\\anidea-matlab-theme-changer-master\\matlab-theme-changer\\src\\matlabThemeChooser.m
EditorMCodeFoldEnabledproperties=Btrue
EditorMRU2=SD:\\Downloads\\anidea-matlab-theme-changer-master\\matlab-theme-changer\\src\\ColorSetting.m
EditorMRU1=SD:\\Downloads\\anidea-matlab-theme-changer-master\\matlab-theme-changer\\src\\applyPrfFile.m
Editormlint-display=Btrue
CodepadShowMessageBar2=Bfalse
RLPrevInitB2_WB_2014b_1=Btrue
DelimiterOptionsTyping=Btrue
Colors_M_Warnings=C-27648
EditorMCodeFoldCollapseFileOpencell=Bfalse
EditorMCodeFoldCollapseFileOpenproperties=Bfalse
Editor.VariableHighlighting.Automatic=Btrue
Editor.VariableHighlighting.Color=C-3479320
Desktop.Font.Text2=F0 9 Microsoft YaHei UI
Color_CmdWinWarnings=C-39936
EditorMCodeFoldEnabledevents=Btrue
ColorsMLintAutoFixBackground=C-1121868
Colors_M_Keywords=C-16776961
Editorhighlight-lines=C-197412
EditorMCodeFoldCollapseFileOpentry=Bfalse
EditorMCodeFoldCollapseFileOpenenumeration=Bfalse
Editor.Language.MATLAB.Indenting=SSmartIndent
EditorMCodeFoldEnabledtry=Btrue
Editorhighlight-caret-row-boolean-color=C-2167080
ReplaceText=S
GeneralNumFormat2=Sshort
EditorMCodeFoldEnabledwhile=Btrue

然后在这个文本后面加上(这里是Darcula主题的预设)

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-5654586
ColorsBackground=C-14803426
Colors_M_Keywords=C-3377102
Colors_M_Comments=C-8355712
Colors_M_Strings=C-9795751
Colors_M_UnterminatedStrings=C-4440260
Colors_M_SystemCommands=C-7707333
Colors_M_Errors=C-6411993
Colors_M_TypeSection=C-14739
Color_CmdWinErrors=C-38040
Color_CmdWinWarnings=C-26368
Colors_HTML_HTMLLinks=C-14124066
Colors_M_Warnings=C-11382726
ColorsMLintAutoFixBackground=C-12569813
Editor.VariableHighlighting.Color=C-13477571
Editor.NonlocalVariableHighlighting.TextColor=C-6785366
Editorhighlight-lines=C-16777216
Editorhighlight-caret-row-boolean=Btrue
Editorhighlight-caret-row-boolean-color=C-14145496
EditorRightTextLineVisible=Btrue
EditorRightTextLimitLineColor=C-11711155
EditorRightTextLineLimit=I80
ColorsSearchResult=C-15379935
Desktop.Font.Code=F0 13 Monospaced

保存重启Matlab即可
在这里插入图片描述

3. 大神作品

https://gitee.com/anidea/matlab-theme-changer
https://gitee.com/anidea/matlab-schemer

References

  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值