Skip to content

Instantly share code, notes, and snippets.

@sam-lb
Last active May 15, 2020 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sam-lb/6c81c9af1e3741e7acd371bb0b0088bf to your computer and use it in GitHub Desktop.
Save sam-lb/6c81c9af1e3741e7acd371bb0b0088bf to your computer and use it in GitHub Desktop.
This script modifies the colors available to the in-browser Desmos graphing calculator.
(function() {
// Calc will be defined when on desmos.
let expressions = Calc.getExpressions();
if (expressions.length == 1 && expressions[0].latex == "") {
Calc.removeExpressions(expressions); // this deletes the first expression, because it will already be loaded with the old colors
}
Calc.updateSettings({"colors": {
"RED": "#ff0000",
"GREEN": "#00ff00",
"BLUE": "#0000ff",
"BLACK": "#000000",
"ORANGE": "#ff8800",
"YELLOW": "#ffff00",
"LIGHTBLUE": "#8888ff",
"PURPLE": "#aa00ff",
"PINK": "#ff00bb",
"BROWN": "#D2691E",
}}); // This defines a new list of ten colors
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment