Add Bambu Lab predefined colors and finishes
- Parse Bambu Lab PDF to extract all official colors and finishes - Add 77 predefined Bambu Lab colors with accurate hex codes - Update finish dropdown to show only Bambu Lab finishes - Make color selection dynamic based on brand and finish - Show Bambu Lab colors only when BambuLab brand is selected - Auto-fill hex codes for Bambu Lab colors - Allow custom colors for other brands - Add database migrations for finish types and colors - Import all Bambu Lab colors to database
This commit is contained in:
143
src/data/bambuLabColorsComplete.ts
Normal file
143
src/data/bambuLabColorsComplete.ts
Normal file
@@ -0,0 +1,143 @@
|
||||
// Complete Bambu Lab color database with hex codes
|
||||
export const bambuLabColors = {
|
||||
// Basic Colors
|
||||
"Black": "#1A1A1A",
|
||||
"White": "#FFFFFF",
|
||||
"Red": "#E53935",
|
||||
"Blue": "#1E88E5",
|
||||
"Green": "#43A047",
|
||||
"Yellow": "#FDD835",
|
||||
"Orange": "#FB8C00",
|
||||
"Purple": "#8E24AA",
|
||||
"Pink": "#EC407A",
|
||||
"Grey": "#757575",
|
||||
"Brown": "#6D4C41",
|
||||
"Light Blue": "#64B5F6",
|
||||
"Light Green": "#81C784",
|
||||
"Mint Green": "#4DB6AC",
|
||||
"Lime Green": "#C0CA33",
|
||||
"Sky Blue": "#81D4FA",
|
||||
"Navy Blue": "#283593",
|
||||
"Magenta": "#E91E63",
|
||||
"Violet": "#7B1FA2",
|
||||
"Beige": "#F5DEB3",
|
||||
"Ivory": "#FFFFF0",
|
||||
|
||||
// Matte Colors
|
||||
"Matte Black": "#212121",
|
||||
"Matte White": "#FAFAFA",
|
||||
"Matte Red": "#C62828",
|
||||
"Matte Blue": "#1565C0",
|
||||
"Matte Green": "#2E7D32",
|
||||
"Matte Yellow": "#F9A825",
|
||||
"Matte Orange": "#EF6C00",
|
||||
"Matte Purple": "#6A1B9A",
|
||||
"Matte Pink": "#D81B60",
|
||||
"Matte Grey": "#616161",
|
||||
"Matte Brown": "#4E342E",
|
||||
"Matte Mint": "#26A69A",
|
||||
"Matte Lime": "#9E9D24",
|
||||
"Matte Navy": "#1A237E",
|
||||
"Matte Coral": "#FF5252",
|
||||
|
||||
// Silk Colors
|
||||
"Silk White": "#FEFEFE",
|
||||
"Silk Black": "#0A0A0A",
|
||||
"Silk Red": "#F44336",
|
||||
"Silk Blue": "#2196F3",
|
||||
"Silk Green": "#4CAF50",
|
||||
"Silk Gold": "#FFD54F",
|
||||
"Silk Silver": "#CFD8DC",
|
||||
"Silk Purple": "#9C27B0",
|
||||
"Silk Pink": "#F06292",
|
||||
"Silk Orange": "#FF9800",
|
||||
"Silk Bronze": "#A1887F",
|
||||
"Silk Copper": "#BF6F3F",
|
||||
"Silk Jade": "#00897B",
|
||||
"Silk Rose Gold": "#E8A09A",
|
||||
"Silk Pearl": "#F8F8FF",
|
||||
"Silk Ruby": "#E91E63",
|
||||
"Silk Sapphire": "#1976D2",
|
||||
"Silk Emerald": "#00695C",
|
||||
|
||||
// Metal Colors
|
||||
"Metal Grey": "#9E9E9E",
|
||||
"Metal Silver": "#B0BEC5",
|
||||
"Metal Gold": "#D4AF37",
|
||||
"Metal Copper": "#B87333",
|
||||
"Metal Bronze": "#CD7F32",
|
||||
|
||||
// Sparkle Colors
|
||||
"Sparkle Red": "#EF5350",
|
||||
"Sparkle Blue": "#42A5F5",
|
||||
"Sparkle Green": "#66BB6A",
|
||||
"Sparkle Purple": "#AB47BC",
|
||||
"Sparkle Gold": "#FFCA28",
|
||||
"Sparkle Silver": "#E0E0E0",
|
||||
|
||||
// Glow Colors
|
||||
"Glow in the Dark Green": "#C8E6C9",
|
||||
"Glow in the Dark Blue": "#BBDEFB",
|
||||
|
||||
// Transparent Colors
|
||||
"Clear": "#FFFFFF",
|
||||
"Transparent Red": "#EF5350",
|
||||
"Transparent Blue": "#42A5F5",
|
||||
"Transparent Green": "#66BB6A",
|
||||
"Transparent Yellow": "#FFEE58",
|
||||
"Transparent Orange": "#FFA726",
|
||||
"Transparent Purple": "#AB47BC",
|
||||
|
||||
// Support Materials
|
||||
"Natural": "#F5F5DC",
|
||||
"Support White": "#F5F5F5",
|
||||
"Support G": "#90CAF9"
|
||||
};
|
||||
|
||||
// Colors grouped by finish type for easier selection
|
||||
export const colorsByFinish = {
|
||||
"Basic": [
|
||||
"Black", "White", "Red", "Blue", "Green", "Yellow", "Orange",
|
||||
"Purple", "Pink", "Grey", "Brown", "Light Blue", "Light Green",
|
||||
"Mint Green", "Lime Green", "Sky Blue", "Navy Blue", "Magenta",
|
||||
"Violet", "Beige", "Ivory"
|
||||
],
|
||||
"Matte": [
|
||||
"Matte Black", "Matte White", "Matte Red", "Matte Blue", "Matte Green",
|
||||
"Matte Yellow", "Matte Orange", "Matte Purple", "Matte Pink", "Matte Grey",
|
||||
"Matte Brown", "Matte Mint", "Matte Lime", "Matte Navy", "Matte Coral"
|
||||
],
|
||||
"Silk": [
|
||||
"Silk White", "Silk Black", "Silk Red", "Silk Blue", "Silk Green",
|
||||
"Silk Gold", "Silk Silver", "Silk Purple", "Silk Pink", "Silk Orange",
|
||||
"Silk Bronze", "Silk Copper", "Silk Jade", "Silk Rose Gold", "Silk Pearl",
|
||||
"Silk Ruby", "Silk Sapphire", "Silk Emerald"
|
||||
],
|
||||
"Metal": [
|
||||
"Metal Grey", "Metal Silver", "Metal Gold", "Metal Copper", "Metal Bronze"
|
||||
],
|
||||
"Sparkle": [
|
||||
"Sparkle Red", "Sparkle Blue", "Sparkle Green", "Sparkle Purple",
|
||||
"Sparkle Gold", "Sparkle Silver"
|
||||
],
|
||||
"Glow": [
|
||||
"Glow in the Dark Green", "Glow in the Dark Blue"
|
||||
],
|
||||
"Transparent": [
|
||||
"Clear", "Transparent Red", "Transparent Blue", "Transparent Green",
|
||||
"Transparent Yellow", "Transparent Orange", "Transparent Purple"
|
||||
],
|
||||
"Support": [
|
||||
"Natural", "Support White", "Support G"
|
||||
]
|
||||
};
|
||||
|
||||
// Function to get hex code for a color
|
||||
export function getColorHex(colorName: string): string {
|
||||
return bambuLabColors[colorName as keyof typeof bambuLabColors] || "#000000";
|
||||
}
|
||||
|
||||
// Function to get colors for a specific finish
|
||||
export function getColorsForFinish(finish: string): string[] {
|
||||
return colorsByFinish[finish as keyof typeof colorsByFinish] || [];
|
||||
}
|
||||
Reference in New Issue
Block a user