This document describes the process for creating/updating themes.
Please read and follow our contribution guidelines.
Fork and clone this project.
Enter the project directory, install the project dependencies, and initialize the development environment.
cd theme-collection
npm install
npm run init
NOTE: This process may take a while, so please be patient.
From within the project directory, create the new theme.
Rules for theme names
- Must only contain alphanumeric chars ('0-9', 'a-z', 'A-Z') and dash ('-')
- Must not begin or end with non-alphanumeric chars
- Must be at least three characters long
- Consecutive non-alphanumeric chars are also forbidden
cd theme-collection
npm run create-theme example-theme
NOTE: Replace example-theme
with the name of the theme being created.
-
From within the project directory, start the development environment.
cd theme-collection npm run dev example-theme
NOTE: Replace
example-theme
with the name of the theme being updated. -
Access Node-RED at http://localhost:41880.
-
Update the colors in
src/themes/example-theme/theme.scss
as required.Good practices
- Don't use opacity, especially on background and border colors. It can cause issues in Node-RED and also with third-party nodes.
- Don't make changes in the following areas:
- Fonts
$primary-font
,$primary-font-size
, and$monospace-font
- Workspace Buttons
$workspace-button
- Nodes
$node-*
and$port-*
- Links
$link-*
- Deploy Button
$deploy-button-*
- Header
$header-*
- Fonts
-
(OPTIONAL) If additional customizations are needed, add them to
src/themes/example-theme/theme-custom.css
. -
(OPTIONAL) Update
src/themes/example-theme/theme-monaco.json
to customize the colors of the Monaco Editor.The default value is
"tomorrow-night-bright"
. Replace it with the name of one of the themes in this list or with a custom Monaco theme object. See this section of the Node-RED documentation for reference. -
(OPTIONAL) Customize Mermaid's theme file -
src/themes/example-theme/theme-mermaid.json
.The default value is
"dark"
. Replace it with the name of one of the themes in this list. -
Refresh Node-RED in the browser to preview the changes.
-
Repeat steps 3 to 7 as needed. When finished, press
ctrl-D
to quit the development environment. -
Commit, push, and create a pull request.
Thanks for taking the time to contribute! 😍