Themes - Jirashi/Textacular GitHub Wiki
To apply a theme to your editor, hover of the View dropdown and press Theme.
There should be two lists, one is light themes and one is dark themes. When you hover over a theme the colors will appear.
There are many themes to choose from and more to come, but if you are unsatisfied with the variety you can make your own.
All themes MUST be in JSON format.
A theme is built up of three components:
- The theme name
- The theme colors (6)
- The theme type (light/dark)
Example:
Theme name -> "default-light": [
Theme colors -> ["#a5a7a2", "#ffffff", "#f7f9fa", "#f3f3f3", "#373b3d", "#369ada"],
Theme type -> "light"],
The colors (0-5) are used as so: 0: Highlight 1: Lightest color/Darkest color 2: Medium color 3: Darkest color/Lightest color 4: Text color 5: Main color
When creating a theme for upload, make sure it is wrapped in {} brackets.
You can style the theme's name by naming it something like
<span style='color: red;'>my-theme</span>
this will show up as red text because when the theme loads the span will be included.
To upload a theme simply navigate to View > Theme and click on the upload theme button. Once you have submitted a valid theme the menu should close, if else an error will be sent in the console.
Your theme should look something like this when uploading:
{"default-light": [["#a5a7a2", "#ffffff", "#f7f9fa", "#f3f3f3", "#373b3d", "#369ada"], "light"]}
You can upload multiple themes by wrapping them all in brackets:
{
"default-light": [["#a5a7a2", "#ffffff", "#f7f9fa", "#f3f3f3", "#373b3d", "#369ada"], "light"],
"default-dark": [["#414141", "#1a1a1a", "#161616", "#121212", "#eaeaea", "#007acc"], "dark"]
}
The theme file is located in the "Config" folder, it is titled theme.json
.
The theme file is filled with CSS rules which are built up of 2 components.
- The target elements
- The style dictionary
Example:
Target element/s -> "body":{
Style type -> "background-color":
Theme color -> 1},
You can see which number to use for the color here
Only put things that need colors here, anything else should go in the css folder.
Borders work a little differently, e.x.
"border: 0 1px 1px 1px solid":3