MCPcopy Create free account
hub / github.com/32comic/image2pixel-web / parsePaletteFile

Function parsePaletteFile

web/js/main.js:808–817  ·  view source on GitHub ↗
(filename, text)

Source from the content-addressed store, hash-verified

806}
807
808function parsePaletteFile(filename, text) {
809 const ext = filename.split('.').pop().toLowerCase();
810 switch (ext) {
811 case 'gpl': return parseGplPalette(text, filename);
812 case 'json': return parseJsonPalette(text, filename);
813 case 'hex': return parseHexPalette(text, filename);
814 case 'txt': return parseTxtPalette(text, filename);
815 default: throw new Error(`Unsupported file format: .${ext}`);
816 }
817}
818
819// --- Bead Blueprint Functions ---
820

Callers 1

main.jsFile · 0.85

Calls 5

parseGplPaletteFunction · 0.85
parseJsonPaletteFunction · 0.85
parseHexPaletteFunction · 0.85
parseTxtPaletteFunction · 0.85
splitMethod · 0.45

Tested by

no test coverage detected