Skip to content

Instantly share code, notes, and snippets.

@snejugal

snejugal/.js Secret

Created July 1, 2018 05:31
Show Gist options
  • Save snejugal/f9f3defdf0ec1485e721a06295910734 to your computer and use it in GitHub Desktop.
Save snejugal/f9f3defdf0ec1485e721a06295910734 to your computer and use it in GitHub Desktop.
Invert theme's colors in .attheme editor
const variables = activeTheme.getVariables();
for (const variable of variables) {
const color = activeTheme.getVariable(variable);
color.red = 255 - color.red;
color.green = 255 - color.green;
color.blue = 255 - color.blue;
activeTheme.setVariable(variable, color);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment