@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 03:37 UTC

main
ts 10 lines 466 Bytes
Raw
1 import type { AppearanceContrast } from "@t3tools/contracts/settings";
2
3 export function applyAppearanceContrast(root: HTMLElement, contrast: AppearanceContrast): void {
4 root.style.setProperty("--appearance-contrast-base", `${Math.min(contrast, 100)}%`);
5 root.style.setProperty("--appearance-contrast-boost", `${Math.max(contrast - 100, 0)}%`);
6 root.style.setProperty(
7 "--appearance-contrast-border-boost",
8 `${Math.max(contrast - 100, 0) / 4}%`,
9 );
10 }