managarten/manadeck/apps/mobile/utils/themeUtils.ts
Till-JS e7f5f942f3 chore: initial commit - consolidate 4 projects into monorepo
Projects included:
- maerchenzauber (NestJS backend + Expo mobile + SvelteKit web + Astro landing)
- manacore (Expo mobile + SvelteKit web + Astro landing)
- manadeck (NestJS backend + Expo mobile + SvelteKit web)
- memoro (Expo mobile + SvelteKit web + Astro landing)

This commit preserves the current state before monorepo restructuring.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 23:38:24 +01:00

31 lines
1.3 KiB
TypeScript

import { useCurrentColors } from '~/store/themeStore';
import { themes } from '~/themes';
export function useThemeColors() {
const currentColors = useCurrentColors();
// Fallback to default theme if currentColors is undefined
const safeColors = currentColors || themes.default.light;
return {
// Convert RGB strings to hex for React Native compatibility
background: `rgb(${safeColors.background})`,
foreground: `rgb(${safeColors.foreground})`,
card: `rgb(${safeColors.surface})`, // Use surface color for cards
surface: `rgb(${safeColors.surface})`,
surfaceElevated: `rgb(${safeColors.surfaceElevated})`,
muted: `rgb(${safeColors.muted})`,
mutedForeground: `rgb(${safeColors.mutedForeground})`,
primary: `rgb(${safeColors.primary})`,
primaryForeground: `rgb(${safeColors.primaryForeground})`,
secondary: `rgb(${safeColors.secondary})`,
secondaryForeground: `rgb(${safeColors.secondaryForeground})`,
accent: `rgb(${safeColors.accent})`,
accentForeground: `rgb(${safeColors.accentForeground})`,
destructive: `rgb(${safeColors.destructive})`,
destructiveForeground: `rgb(${safeColors.destructiveForeground})`,
border: `rgb(${safeColors.border})`,
input: `rgb(${safeColors.input})`,
ring: `rgb(${safeColors.ring})`,
};
}