Skip to content

Make a theme!

Mistium edited this page Jul 13, 2024 · 2 revisions

First updates

https://github.com/MistBolt/scratch-gui/blob/develop/src/lib/themes/index.js

Screenshot 2024-07-13 at 13 32 18

Just add the theme name and data here, then add it in the bit below too, follow the format

Screenshot 2024-07-13 at 13 32 41

Then scroll all the way to the bottom, and add it in before "ACCENT_MAP"

Screenshot 2024-07-13 at 13 33 24

Making the actual theme file and data

https://github.com/MistBolt/scratch-gui/tree/develop/src/lib/themes/accent

Just add a new file in here, named the theme name you want

Screenshot 2024-07-13 at 13 34 25

This is the "gay" theme, you only need to worry about the json data

const guiColors = {
    'motion-primary': '#078e70', // dark green
    'motion-primary-transparent': 'rgba(7, 142, 112, 0.9)', // dark green with transparency
    'motion-tertiary': '#26cfaa', // medium green

    'looks-secondary': '#98e9c1', // light green
    'looks-transparent': 'rgba(152, 233, 193, 0.35)', // light green with transparency
    'looks-light-transparent': 'rgba(152, 233, 193, 0.15)', // very light green with transparency
    'looks-secondary-dark': 'hsla(145, 50%, 75%, 1)', // light green in HSL

    'extensions-primary': 'hsla(150, 100%, 50%, 1)', // medium green in HSL
    'extensions-tertiary': 'hsla(220, 58%, 62%, 1)', // blue in HSL
    'extensions-transparent': 'hsla(150, 100%, 50%, 0.43)', // medium green with transparency in HSL
    'extensions-light': 'hsla(150, 50%, 75%, 1)', // light green in HSL

    'drop-highlight': '#fbfefc', // white

    'menu-bar-background-image': 'linear-gradient(90deg, rgba(7, 142, 112, 0.75) 0%, rgba(38, 207, 170, 0.75) 16.67%, rgba(152, 233, 193, 0.75) 33.33%, rgba(251, 254, 252, 0.75) 50%, rgba(123, 173, 226, 0.75) 66.67%, rgba(80, 73, 203, 0.75) 83.33%, rgba(63, 32, 130, 0.75) 100%)'
};

const blockColors = {
    checkboxActiveBackground: '#078e70', // dark green
    checkboxActiveBorder: '#3f2082' // dark purple
};

export {
    guiColors,
    blockColors
};

If you are too lazy to make the theme, just copy this code, paste it to chat gpt and say "i want a theme with these colours" it will be able to make an alright theme

Upload your theme icon

Go to this directory, and upload an svg of the icon with the name format below:

tw-accent-rainbow.svg

Screenshot 2024-07-13 at 13 38 59

https://github.com/MistBolt/scratch-gui/tree/develop/src/components/menu-bar

Register the theme with the gui

Edit the file below:

https://github.com/MistBolt/scratch-gui/blob/develop/src/components/menu-bar/tw-theme-accent.jsx

Add an import, as you see below for your theme:

Screenshot 2024-07-13 at 13 40 23

Then you need to add it to the json below

Screenshot 2024-07-13 at 13 41 01

And add it into this json too

Screenshot 2024-07-13 at 13 41 27

Congrats you are done!

Clone this wiki locally