Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.