import { type Analysis, origin } from "../theory/analysis.ts"; /** the class that colours a chord by where it comes from, relative to the key */ export function originClass(a: Analysis | undefined): string { const from = a && origin(a); if (from === "home" || from === "sharp" || from === "flat" || from === "inverse") return `on-${from}`; return from ? `from-${from}` : a ? "chromatic" : ""; }