Yaltopia-Tickets-App/lib/colors.ts
2026-03-11 22:48:53 +03:00

20 lines
645 B
TypeScript

import { useColorScheme } from 'react-native';
/**
* Consistent colors for placeholders and muted text throughout the app.
* Dark: rgba(255,255,255,0.6), Light: rgba(0,0,0,0.6)
*/
export const getPlaceholderColor = (isDark: boolean) => isDark ? 'rgba(255,255,255,0.6)' : 'rgba(0,0,0,0.6)';
export const getMutedColor = (isDark: boolean) => isDark ? 'rgba(255,255,255,0.6)' : 'rgba(0,0,0,0.6)';
/**
* Hook to get consistent colors based on current theme.
*/
export const useAppColors = () => {
const isDark = useColorScheme() === 'dark';
return {
placeholder: getPlaceholderColor(isDark),
muted: getMutedColor(isDark),
};
};