semantic color naming

This commit is contained in:
2023-12-15 19:48:42 +01:00
parent 69c5b00b1f
commit 94c1574d96
10 changed files with 4942 additions and 4905 deletions

View File

@ -1,6 +1,7 @@
import { EditorView } from "@codemirror/view";
import { sendToServer, type OSCMessage, oscMessages } from "./IO/OSC";
import { getAllScaleNotes, nearScales, seededRandom } from "zifferjs";
import colorschemes from "./colors.json";
import {
MidiCCEvent,
MidiConnection,
@ -2276,4 +2277,9 @@ export class UserAPI {
this.app.readTheme(color_scheme);
console.log("Changing color scheme for: ", color_scheme)
}
public randomTheme = (): string => {
let theme_names = Object.keys(colorschemes);
return theme_names[Math.floor(Math.random() * theme_names.length)];
}
}