Skip to content

armgit / pdfcn

Public Imported from GitHub
0

Beautiful pdf components, built on Takumi and Forme. 100% Free, Zero config, one command setup.

519 B
Raw Blame
export interface GameColors {
  background: string;
  foreground: string;
  mutedForeground: string;
}

const readColor = (variable: string, fallback: string) => {
  const value = getComputedStyle(document.documentElement)
    .getPropertyValue(variable)
    .trim();

  return value || fallback;
};

export const loadColors = (): GameColors => ({
  background: readColor("--background", "#ffffff"),
  foreground: readColor("--foreground", "#171717"),
  mutedForeground: readColor("--muted-foreground", "#737373"),
});