Creating themes

What is a theme?

A theme is something allowing the user to change the look of MCreator by different elements like images, the color scheme and fonts used by MCreator. It is similar to resource packs of Minecraft, but it is for MCreator and only one theme can be selected currently. If an element in the theme is not changed, MCreator will automatically take the element of the default theme, which is default_dark.

The folder

To create new themes, you will have to add a themes the folder at the base root of the plugin. Then, each theme needs to have its own folder. The name you will give to the folder will be the ID of your theme. It is this ID that will be shown in the drop-down list, on the UI themes panel in preferences.

Icon

If you want to give an icon to your theme for the UI themes panel, you can add a PNG file inside your theme's folder named icon.png. However, this icon is optional and will not cause errors if you decide to not make one.

JSON file

To use your theme, MCreator needs to detect a specific file inside the folder of your theme. This file can be used to define basic values of the theme, re-define the color scheme of MCreator and change the default font. The file has to be theme.json.

Basic properties

Name

(Mandatory) The name of the theme.

Description

(Optional) Explain shortly what is this theme. The description can also be translated by using the texts.properties files. The ID of a theme's description is theme.theThemeID.description.

Credits

(Optional) If someone helped you to create something in the theme, you can give him the credit here.

Version

(Optional) The version of your theme

ColorScheme

A color scheme is an optional object, inside the theme.json, defining the look of MCreator in general. This object contains only the 5 main colors used by the software and the possibility to override the interface accent color selected by the user. In addition, a color scheme can also define the style and colors of the Blockly panels and the code editor, if files are inside the theme.

JSON file object

These parameters are the 6 parameters the colorScheme object can take inside the theme.json. All colors have to be in a hexadecimal format and follow this template0x...... (each .is a letter or a number).

BackgroundColor

Background of UI panels

AltBackgroundColor

Background of components (e.g. text fields, checkboxes and sound selectors)

SecondAltBackground

Second background color used (e.g. workspace background)

ForegroundColor

Color used for most texts

AltForegroundColor

Secondary text

InterfaceAccentColor

(Optional) Overrides the interfaceAccentColor defined by the user in preferences.

Style files

The style folder contains the CSS file defining colors used by the Blockly panels. This folder can have the XML file changing colors of the MCreator's code editor.

Fonts

A theme can also change the console font.

Console font

The console font is used for the console and can only be a custom font. You have to rename it for console_font.ttf and place it inside a fonts folder.

Example

Default dark

The following example is the theme.json of the MCreator's default dark theme.

{
  "name": "Default Dark",
  "colorScheme": {
    "secondAltBackgroundColor": "0x1e1e1e",
    "backgroundColor": "0x323232",
    "altBackgroundColor": "0x505050",
    "altForegroundColor": "0xc2c2c2",
    "foregroundColor": "0xf5f5f5"
  }
}

Second example

The following JSON file is an example of a file defining all parameters.

{
  "name": "Second Example",
  "description": "A second example for the Wiki page",
  "credits": "My dog",
  "version": "1.0",
  "colorScheme": {
    "backgroundColor": "0x323232",
    "altBackgroundColor": "0x505050",
    "secondAltBackgroundColor": "0x1e1e1e",
    "foregroundColor": "0xf5f5f5",
    "altForegroundColor": "0xc2c2c2",
    "interfaceAccentColor": "0xf5f5f5"
  }
}

Images

As Minecraft resource packs, you can change the images of MCreator, by adding an image with the same name and inside the same folder. Images need to be placed inside a images folder. To get the exact names of each image folder and image, you can check the default dark theme here, the theme containing all images. If you want to change only one image, it is possible. MCreator will get images from the default dark theme. They can be in PNG or SVG (recommended) format.



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.