A small framework for working with .attheme files in JS.
Signed int
as a variable value;- Hex (
#rrggbb
and#aarrggbb
) as a variable value; - Image wallpapers.
You can either install attheme-js
package from npm:
npm install --save attheme-js
or download the framework from the “Releases” section.
Require the attheme-js
module:
const Attheme = require("attheme-js");
Add a new <script>
tag to your HTML:
<script src="path/to/attheme.min.js"></script>
If you install the framework from npm, the path is node_modules/attheme-js/dist/attheme.min.js
.
const emptyTheme = new Attheme();
const themeContent =
`windowbackgroundWhite=#012226
actionBarDefault=-3047847`;
const theme = new Attheme(themeContent);
theme.actionBarDefaultIcon = {
red: 76,
blue: 175,
green: 80,
alpha: 128
};
theme.actionBarDefault.red = 244;
const themeContent = theme.asText();
/*
windowBackgroundWhite=#012226
actionBarDefault=#d17e59
*/
const themeWallpaper = theme[Attheme.IMAGE_KEY];
See the documentation here.