Creates and edits Project Arrhythmia themes.
🏠 Homepage
npm install pa-theme
import { Theme } from "pa-theme";
const { Theme } = require("pa-theme");
You can create a theme:
- With default colors
const theme = New Theme();
const theme = CreateTheme({
name: "Theme name",
});
- With specified colors
const theme = CreateTheme({
gui: "#FFFFFF",
background: "#7F7F7F",
});
Setting the theme's properties
- Theme's ID (MUST be a unique 6 digit numeric string)
theme.id = "573168";
- You can also use a helper function
import { ThemeUtils } from "pa-theme";
// ...
theme.id = ThemeUtils.randomThemeId();
- Setting other properties
theme.name = "Theme";
theme.gui = "#FFFFFF";
theme.objects = ["#ff0000", "#ffa200", "#bfff00" /* ... */];
You can convert the theme to a JSON string/object, then write it to a file.
const fs = require("fs");
fs.writeFileSync("theme.lst", theme.toString());
You can read an existing theme from the string/object.
const fs = require("fs");
const jsonString = fs.readFileSync("theme.lst");
const json = JSON.parse(jsonString);
const theme = new Theme();
theme.fromJson(json);
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a ⭐️ if this project helped you!
Copyright © 2023 PA Toolkit.
This project is MIT licensed.
This README was generated with ❤️ by readme-md-generator