turash/bugulma/frontend/lib/pixel-art/palettes.ts
Damir Mukimov 6347f42e20
Consolidate repositories: Remove nested frontend .git and merge into main repository
- Remove nested git repository from bugulma/frontend/.git
- Add all frontend files to main repository tracking
- Convert from separate frontend/backend repos to unified monorepo
- Preserve all frontend code and development history as tracked files
- Eliminate nested repository complexity for simpler development workflow

This creates a proper monorepo structure with frontend and backend
coexisting in the same repository for easier development and deployment.
2025-11-25 06:02:57 +01:00

103 lines
2.1 KiB
TypeScript

/**
* Pixel Art Library - Color Palettes
*
* Predefined color palettes for common pixel art styles
*/
import type { ColorPalette } from '@/lib/pixel-art/types';
export const PALETTES: Record<string, ColorPalette> = {
warm: {
name: 'Warm Tones',
colors: {
background: '#FFF8DC',
crustLight: '#F4E4BC',
crustMedium: '#E8C547',
crustDark: '#D4A574',
crustDarker: '#B8864A',
crustEdge: '#8B4513',
meatLight: '#DC143C',
meatMedium: '#B22222',
meatDark: '#8B0000',
onionLight: '#FFFACD',
onionMedium: '#F0E68C',
steam: '#FFFFFF',
stars: '#FFD700',
sparkles: '#FFFFFF',
heart: '#FF69B4',
},
},
cool: {
name: 'Cool Tones',
colors: {
background: '#F0F8FF',
primary: '#4169E1',
secondary: '#87CEEB',
accent: '#00CED1',
dark: '#191970',
light: '#E0F6FF',
},
},
earth: {
name: 'Earth Tones',
colors: {
background: '#F5F5DC',
brown: '#8B4513',
tan: '#D2B48C',
green: '#556B2F',
darkGreen: '#2F4F2F',
beige: '#F5DEB3',
},
},
vibrant: {
name: 'Vibrant',
colors: {
background: '#FFFFFF',
red: '#FF0000',
blue: '#0000FF',
green: '#00FF00',
yellow: '#FFFF00',
purple: '#800080',
orange: '#FFA500',
},
},
monochrome: {
name: 'Monochrome',
colors: {
white: '#FFFFFF',
lightGray: '#E0E0E0',
gray: '#808080',
darkGray: '#404040',
black: '#000000',
},
},
};
/**
* Get a color from a palette
*/
export function getColor(palette: ColorPalette, colorName: string): string {
return palette.colors[colorName] || '#000000';
}
/**
* Create a custom palette
*/
export function createPalette(name: string, colors: Record<string, string>): ColorPalette {
return { name, colors };
}
/**
* Merge multiple palettes
*/
export function mergePalettes(...palettes: ColorPalette[]): ColorPalette {
const merged: Record<string, string> = {};
palettes.forEach((palette) => {
Object.assign(merged, palette.colors);
});
return {
name: 'Merged',
colors: merged,
};
}