scottclowe / matlab-schemer

Apply and save color schemes in MATLAB with ease.
BSD 2-Clause "Simplified" License
1.19k stars 273 forks source link

R2016a and later: "Validation sections" syntax highlighting ? #21

Open Brad-Stiritz opened 6 years ago

Brad-Stiritz commented 6 years ago

Hi Scott,

Thank you so much for implementing and sharing this repository, it's very appreciated! I'm working in R2018a, and having trouble finding the *.prf color setting for Matlab's so-called "Validation sections":

Preferences / Colors / MATLAB syntax highlighting colors / Validation sections

Within classdef files, this controls the color of per-property class type declarations, as explained here. I believe property validation was introduced into Matlab in R2016a.

Please let me know your thoughts on adding support for this, within the schemer *.prf files?

Thanks, Brad

scottclowe commented 6 years ago

Hi Brad,

Thanks for pointing this out. I wasn't aware this setting had been added to MATLAB, and hadn't noticed the new colour setting existed. (I don't update to new versions of MATLAB when they release due to the poor backward compatibility in MATLAB which has previously broken my code without warning. However, I do check the download new versions just to see if there are any new colour settings introduced.)

I will add this parameter to the schemer export and import functions, and then issue updates to the colour schemes which include a definition for this.

As a note for you and for my own reference when implementing this: The colour for "Validation sections" is set by Colors_M_TypeSection in the matlab.prf file, and has a default value of Colors_M_TypeSection=C-6270419 (which corresponds to a mid-dark brown, hex A0522D, RGB=(160, 82, 45)). It affects text and thus should probably default to the same colour as the main text body.