bb-plane-fork/packages/utils/src/theme-legacy.ts
sriram veeraghanta 02d0ee3e0f
chore: add copyright (#8584)
* feat: adding new copyright info on all files

* chore: adding CI
2026-01-27 13:54:22 +05:30

27 lines
1.1 KiB
TypeScript

/**
* Copyright (c) 2023-present Plane Software, Inc. and contributors
* SPDX-License-Identifier: AGPL-3.0-only
* See the LICENSE file for details.
*/
/**
* Legacy Theme System
*
* This file contains the old 5-color theme system for backward compatibility.
*
* @deprecated Most functions in this file are deprecated
* New code should use the OKLCH-based theme system from ./theme/ instead
*
* Functions:
* - applyTheme: OLD 5-color theme system (background, text, primary, sidebarBg, sidebarText)
* - unsetCustomCssVariables: Clears both old AND new theme variables (updated for OKLCH)
* - resolveGeneralTheme: Utility to resolve theme mode (still useful)
* - migrateLegacyTheme: Converts old 5-color theme to new 2-color system
*
* For new implementations:
* - Use: import { applyCustomTheme, clearCustomTheme } from '@plane/utils/theme'
* - See: packages/utils/src/theme/theme-application.ts
*/
export const resolveGeneralTheme = (resolvedTheme: string | undefined) =>
resolvedTheme?.includes("light") ? "light" : resolvedTheme?.includes("dark") ? "dark" : "system";