File size: 950 Bytes
8ec5b83 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
// Shared color utilities for consistent heatmap theming
// Use exact same colors for both daily and weekly views
const EMPTY_DOT_DARK = "#374151"; // gray-600 equivalent
const EMPTY_DOT_LIGHT = "#d1d5db"; // gray-300 equivalent
export const getHeatmapTheme = (primaryColor: string) => ({
dark: [EMPTY_DOT_DARK, primaryColor],
light: [EMPTY_DOT_LIGHT, primaryColor],
});
export const getHeatmapColorIntensity = (level: number, primaryColor: string) => {
if (level === 0) {
return null; // Will use CSS classes for theme-aware empty state
}
// Use different intensities of the primary color or default green scale
const greenIntensities = ['#0e4429', '#006d32', '#26a641', '#39d353'];
return greenIntensities[Math.min(level - 1, 3)] || primaryColor;
};
export const getEmptyDotColors = () => ({
dark: EMPTY_DOT_DARK,
light: EMPTY_DOT_LIGHT,
});
export const getEmptyDotClasses = () => "bg-[#d1d5db] dark:bg-[#374151]"; |