{"id":13616640,"url":"https://github.com/scottclowe/matlab-schemer","last_synced_at":"2025-04-08T15:13:29.585Z","repository":{"id":34591980,"uuid":"38539280","full_name":"scottclowe/matlab-schemer","owner":"scottclowe","description":"Apply and save color schemes in MATLAB with ease.","archived":false,"fork":false,"pushed_at":"2023-12-13T03:58:36.000Z","size":1132,"stargazers_count":1219,"open_issues_count":17,"forks_count":276,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-04-01T14:13:16.456Z","etag":null,"topics":["color-scheme","color-theme","colours","matlab","matlab-schemes","matlab-syntax","scheme","syntax-highlighting","theme"],"latest_commit_sha":null,"homepage":null,"language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scottclowe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-07-04T15:56:55.000Z","updated_at":"2025-03-22T09:14:16.000Z","dependencies_parsed_at":"2023-02-10T06:01:00.098Z","dependency_job_id":"ae919e42-139e-44de-8636-4a40de1e8d74","html_url":"https://github.com/scottclowe/matlab-schemer","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottclowe%2Fmatlab-schemer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottclowe%2Fmatlab-schemer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottclowe%2Fmatlab-schemer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottclowe%2Fmatlab-schemer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scottclowe","download_url":"https://codeload.github.com/scottclowe/matlab-schemer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247867362,"owners_count":21009240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["color-scheme","color-theme","colours","matlab","matlab-schemes","matlab-syntax","scheme","syntax-highlighting","theme"],"created_at":"2024-08-01T20:01:31.379Z","updated_at":"2025-04-08T15:13:29.548Z","avatar_url":"https://github.com/scottclowe.png","language":"MATLAB","funding_links":[],"categories":["MATLAB Tools","MATLAB Tools, Libraries, Frameworks","Tools","MATLAB"],"sub_categories":["Interfaces","viii. Linear Regression","Mesh networks"],"readme":"[![MATLAB FileExchange](https://img.shields.io/badge/MATLAB-FileExchange-orange.svg)][fex]\n\n\nMATLAB Schemer\n==============\n\nThis MATLAB package makes it easy to change the color scheme (a.k.a. theme) of\nthe MATLAB display and GUI.\n\nYou can use Schemer to import a predefined color scheme, transfer your color\nsettings between installations, or create your own color scheme.\n\nA collection of color schemes is available in the schemes folder.\nSamples of these can be seen in [schemes/README.md](schemes/README.md),\nand browsed in the folder [schemes/screenshots](schemes/screenshots).\nThis is a static subtree copy of the contents of the repository\n[matlab-schemes].\n\n![MATLAB Schemer logo](logo.png)\n\n\nImporting a color scheme\n------------------------\n\nColor schemes can be easily imported by running `schemer_import` at the MATLAB\ncommand prompt, without needing any inputs. This will open a GUI to select the\nfile to import the color scheme from.\n\nWhen importing a color scheme, most of the settings will change immediately.\nHowever, some settings will require MATLAB to be restarted:\n- Variable highlighting colours\n- Wavy underlines for errors\n- Wavy underlines for warnings\n\nFor more details, see the documentation on the function `schemer_import`,\navailable with `help schemer_import`.\n\n\nTransferring a color scheme between MATLAB installations\n--------------------------------------------------------\n\nIf you are using a personalised color scheme in MATLAB, you may wish to save\nit for yourself so you can re-implement it easily if you reintall MATLAB.\nOr you may wish to transfer your personalised color scheme from one machine\nto another. This section describes the steps relevant in either scenario.\n\nOn the source machine, run `schemer_export` to save a temporary color scheme\nfile, and then transfer this file to the destination machine.\n\nWhen importing the new color scheme, instead of running `schemer_import` without\nany inputs, you should run `schemer_import(true)`. This passes a flag to tell\nthe function to not only import the colour preferences, but to also import your\nboolean settings (such as whether to highlight the current cell/line, etc)\nfrom the file you exported from the source installation.\n\n\nReverting to the MATLAB default color scheme\n--------------------------------------------\n\nShould you wish to revert to the set of colours which MATLAB ships with, you\nshould run `schemer_import('schemes/default.prf')`.\n\nThis will import the MATLAB default theme from the stylesheet `default.prf`\nwhich comes as part of Schemer.\n\nTo restore the out-of-the-box state for boolean settings (such as whether to\nhighlight the current line) in addition to the colours, run\n`schemer_import('schemes/default.prf', true)`.\n\nYou may be tempted to instead revert the colours by clicking the\n`Restore Default Colors` buttons in the `Color` pane of the MATLAB preferences.\nHowever, this will be less effective than importing the default colours through\nSchemer because these buttons will not reset all the MATLAB colour preferences.\n(There is no reset button for the Editor display preferences pane, nor for the\nother language syntax supported by MATLAB, which is available in the Editor\nLanguages panel.)\n\n\nCreating a color scheme for others to use\n-----------------------------------------\n\nWhen creating a color scheme to share with the rest of the world, it is\nrecommended to ensure colours are chosen appropriately for all possible\nsettings, even if they are not enabled.\n\nFor example, if you are creating a dark colour scheme, you may have cell\nhighlighting disabled but it would still be ill-advised to leave the background\nhighlight colour for cell displays as the default pale beige because other users\nmay have this setting enabled.\n\n\n### Exporting through the GUI\n\nIf you have made a custom color scheme using the MATLAB GUI to pick the colours,\nyou can export the new color scheme with `schemer_export`.\n\nPlease note, this requires you to have visited all relevant panes of the\nPreferences window at least once since MATLAB was installed, even if the\nsettings have not been changed from the default.\nSee the help for `schemer_export` for more details.\n\n\n### Porting a theme from a different editor\n\nIf you are converting a color scheme designed for another editor into a MATLAB\nstylesheet, you may find it easier to start with a duplicate of the template\nstylesheet [develop/template_scheme.prf](develop/template_scheme.prf) and copy\nthe colours into this.\n\nTo understand which colour settings the parameter names correspond to, you can\nrefer to the annotated screenshot,\n[develop/annotated_default.png](develop/annotated_default.png).\n\n![Annotated screenshot](develop/annotated_default.png)\n\nThe values for each colour in the .prf stylesheet must be recorded as single\nRGB integers, with each colour channel in 8-bit (0-255), R as big endian,\nand a opaque alpha channel. Because the format for RGB colours in Java allows\nfor an alpha channel and the integers are signed, all the colours you record\nin your .prf file should be negative, spanning the range\n`-16777216` (black, `[0,0,0]`) to `-1` (white, `[255,255,255]`).\n\nThe text file for your pre-existing theme will typically specify its colous in\nhexadecimal format, or in terms of R, G, B values. You will need\nto convert the colours from this format into the format which MATLAB preference\nfiles use to specify colours instead.\nThe Schemer package comes with a utility function\n[develop/color2javaRGBint.m](develop/color2javaRGBint.m)\nto help make this easier. See the `color2javaRGBint` documentation for more\ndetails.\n\n\n### Setting colours for additional languages\n\nMATLAB supports syntax highlighting for several languanges in addition to its own.\nCurrently these languages are\nMuPAD, TLC, VRML, C/C++, Java, VHDL, Verilog, and XML/HTML.\nThe colours used for the syntax highlighting of all these languages can be set\nin the Languages subpanel of the Editor/Debugger pane in the Preferences window.\n\nTypically, one will want to make a color scheme which has colours in these\nlanguages which match the colours of the analogous MATLAB syntax.\nBy default, this is the behaviour which Schemer will perform. \n\nWithout specifying any inputs to `schemer_export`, an exported color scheme file\nwill contain only the colours used for MATLAB syntax highlighting and no other\nlanguages, since it is expected that users will typically not set the colours\nfor any of these languages. When this is loaded with `schemer_import`, the missing\ncolours for additional languages are automatically completed based on the MATLAB\nsyntax.\n\nIf you do customise the colours for the additional language syntax highlighting,\nyou can export this by setting an appropriate flag, such as `schemer_export(3)`.\nFor more details, see the `schemer_export` documentation.\n\nIf you are designing a color scheme and are very detail-oriented, you may like to\ndo the following.\n\n1. Configure the colours for the MATLAB syntax first in the Preferences \u003e Colors\n   panel and Programming Tools subpanel, along with Editor/Debugger \u003e Display\n   preference pane for the Current line highlighting and Right-hand text limit.\n2. Export the colorscheme with `schemer_export('tmp.prf',1)`, excluding additional\n   language syntax from the export.\n3. Load the colorscheme with `schemer_import('tmp.prf')`, which overwrites the\n   syntax for the additional languages with automatically inferred colours.\n4. Open up the panel Preferences \u003e Editor/Debugger \u003e Languages and inspect the\n   quality of the colorscheme in the addition languages.\n5. Fix or improve any perceived issues with the colorscheme in the Languages panel.\n6. Export the colorscheme again, but this time with `schemer_export(3)` to include\n   the customised colours for the additional languages.\n\n\n### Adding your scheme to this package\n\nIf you are particularly proud of your new color scheme (and why wouldn't you be)\nand would like to to share it with the world as part of the `matlab-schemer`\npackage, this is possible!\n\nPlease head over to our daughter repository, [matlab-schemes][], which holds the\nmaster copy of the color schemes issued here as part of Schemer in the schemes\ndirectory.\n\nIf you fork [matlab-schemes][], add your `.prf` file and issue a pull request,\nthe new scheme will be reviewed and added to the repository.\nThis content is then mirrored here using `git subtree`. For more details, see\nour [CONTRIBUTING.md](CONTRIBUTING.md).\n\n\nAddendum\n--------\n\n### Requirements\n\nPlease note that Schemer requires MATLAB to be run with Java support enabled.\n\n\n### Further information\n\nFor details on how the method was implemented, see\n[this Undocumented Matlab article](http://undocumentedmatlab.com/blog/changing-system-preferences-programmatically).\n\n\n  [matlab-schemes]: https://github.com/scottclowe/matlab-schemes\n  [fex]:            http://mathworks.com/matlabcentral/fileexchange/53862-matlab-schemer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottclowe%2Fmatlab-schemer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscottclowe%2Fmatlab-schemer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottclowe%2Fmatlab-schemer/lists"}