Skip to content

Instantly share code, notes, and snippets.

@RyanNutt
Last active December 19, 2023 21:50
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyanNutt/cb8d60997d97905f0b2aea6c3b5c8ee0 to your computer and use it in GitHub Desktop.
Save RyanNutt/cb8d60997d97905f0b2aea6c3b5c8ee0 to your computer and use it in GitHub Desktop.
Ace Editor themes in a pair of PHP arrays :: https://www.nutt.net/ace-editor-syntax-highlighting-mode-list/

Ace Editor Themes

I really like the Ace Editor and have used it pretty much any time I've needed a text or code editor. And I've probably gone to the Ace Kitchen Sink at least a dozen times to get a list of all the available themes so I could generate a list.

Now I'm tired of wasting so much time so I'm going to just paste the array that I've recreated a dozen times here so I don't have to keep going back and redoing it.

There are two arrays, $ace_light and $ace_dark that list each of the themes in that set. The array key is the filename of the theme that you'd use in setMode() and the value is the actual name.

There's also an array $ace_themes that is the light and dark lists merged.

<?php
$ace_light = [
'chrome' => 'Chrome',
'clouds' => 'Clouds',
'crimson_editor' => 'Crimson Editor',
'dawn' => 'Dawn',
'dreamweaver' => 'Dreamweaver',
'eclipse' => 'Eclipse',
'github' => 'GitHub',
'iplastic' => 'IPlastic',
'katzenmilch' => 'KatzenMilch',
'kuroir' => 'Kuroir',
'solarized_light' => 'Solarized Light',
'sqlserver' => 'SQL Server',
'textmate' => 'TextMate',
'tomorrow' => 'Tomorrow',
'xcode' => 'XCode'
];
$ace_dark = [
'ambiance' => 'Ambiance',
'chaos' => 'Chaos',
'clouds_midnight' => 'Clouds Midnight',
'cobalt' => 'Cobalt',
'dracula' => 'Dracula',
'gob' => 'Greeon on Black',
'gruvbox' => 'Gruvbox',
'idle_fingers' => 'idle Fingers',
'kr_theme' => 'krTheme',
'merbivore' => 'Merbivore',
'merbivore_soft' => 'Merbivore Soft',
'mono_industrial' => 'Mono Industrial',
'monokai' => 'Monokai',
'pastel_on_dark' => 'Pastel on Dark',
'solarized_dark' => 'Solarized Dark',
'terminal' => 'Terminal',
'tomorrow_night' => 'Tomorrow Night',
'tomorrow_night_blue' => 'Tomorrow Night Blue',
'tomorrow_night_bright' => 'Tomorrow Night Bright',
'tomorrow_night_eighties' => 'Tomorrow Night 80s',
'twilight' => 'Twilight',
'vibrant_ink' => 'Vibrant Ink'
];
$ace_themes = array_merge($ace_light, $ace_dark);
@ldijkman
Copy link

ldijkman commented Oct 2, 2023

Maybe useful to me for color search highlight minimap

https://ldijkman.github.io/Ace_Seventh_Heaven/Hell.html

Screenshot_20231002-122018_Chrome

@MatheusLTrindade
Copy link

It would be cool to add the theme: "bearded theme black & amethyst"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment