File size: 653 Bytes
55fb2cf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
document.addEventListener('DOMContentLoaded', function() {
    // Initialize any interactive elements here
    console.log('Pixel Palette Explorer loaded!');
    
    // Example: Add click event to color swatches
    const colorSwatches = document.querySelectorAll('[class*="bg-"]');
    colorSwatches.forEach(swatch => {
        swatch.addEventListener('click', function() {
            const colorClass = Array.from(this.classList)
                .find(cls => cls.startsWith('bg-'));
            const colorName = colorClass ? colorClass.replace('bg-', '') : 'unknown';
            console.log(`Selected color: ${colorName}`);
        });
    });
});