|
| 1 | +# Stream Deck Icon Generator |
| 2 | + |
| 3 | +A powerful web-based tool for creating custom Stream Deck icons with gradient backgrounds. Generate professional-looking icons by combining FontAwesome SVG graphics with customizable gradient overlays, all exportable as PNG files in multiple sizes. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +### Icon Management |
| 8 | +- ✓ **549+ FontAwesome Icons** - Browse and search through a comprehensive icon library |
| 9 | +- ✓ **Lazy Loading** - Optimized icon picker with IntersectionObserver for fast performance |
| 10 | +- ✓ **Real-time Search** - Debounced search with instant filtering |
| 11 | +- ✓ **SVG Caching** - Intelligent caching system for 90% faster loading |
| 12 | + |
| 13 | +### Gradient Customization |
| 14 | +- ✓ **Linear & Radial Gradients** - Switch between gradient types |
| 15 | +- ✓ **Multi-stop Gradients** - Add, remove, and position unlimited color stops |
| 16 | +- ✓ **Interactive Gradient Bar** - Drag color stops directly on the preview bar |
| 17 | +- ✓ **Gradient Randomizer** - Generate random gradients with optional base color |
| 18 | +- ✓ **Preset Styles** - Choose from Smooth, Glossy, Vibrant, and Subtle gradient styles |
| 19 | +- ✓ **Color-Aware Generation** - Create grayscale or same-hue gradients based on base color |
| 20 | + |
| 21 | +### Export & Workflow |
| 22 | +- ✓ **Multiple Sizes** - Export at 72x72, 144x144, or 256x256 pixels |
| 23 | +- ✓ **Batch Export** - Export all three sizes simultaneously |
| 24 | +- ✓ **Copy to Clipboard** - Quick copy for immediate use |
| 25 | +- ✓ **File System Access API** - Choose custom save locations |
| 26 | +- ✓ **Adjustable Corner Radius** - Customize border rounding (0-28px) |
| 27 | + |
| 28 | +### User Experience |
| 29 | +- ✓ **Preset Management** - Save, load, and delete gradient presets |
| 30 | +- ✓ **State Persistence** - LocalStorage saves your settings between sessions |
| 31 | +- ✓ **Keyboard Shortcuts** - Full keyboard navigation support |
| 32 | +- ✓ **Real-time Preview** - Instant canvas updates with zoom controls (1x, 4x, 8x) |
| 33 | +- ✓ **Fully Accessible** - WCAG-compliant with ARIA labels and semantic HTML |
| 34 | +- ✓ **Responsive Design** - Optimized for desktop, tablet, and mobile devices |
| 35 | +- ✓ **Dark Theme** - Modern dark morphism gradient background |
| 36 | + |
| 37 | +## Demo |
| 38 | + |
| 39 | +Visit the live demo: [Stream Deck Icon Generator](https://syntaxsidekick.github.io/Stream-Deck-Icon-Generator/) *(update with your actual URL)* |
| 40 | + |
| 41 | +## Installation |
| 42 | + |
| 43 | +### Local Development |
| 44 | + |
| 45 | +1. Clone the repository: |
| 46 | +```bash |
| 47 | +git clone https://github.com/SyntaxSidekick/Stream-Deck-Icon-Generator.git |
| 48 | +cd Stream-Deck-Icon-Generator |
| 49 | +``` |
| 50 | + |
| 51 | +2. Serve the application using any static file server: |
| 52 | + |
| 53 | +**Using npx (recommended):** |
| 54 | +```bash |
| 55 | +npx serve . |
| 56 | +``` |
| 57 | + |
| 58 | +**Using Python:** |
| 59 | +```bash |
| 60 | +# Python 3 |
| 61 | +python -m http.server 8000 |
| 62 | + |
| 63 | +# Python 2 |
| 64 | +python -m SimpleHTTPServer 8000 |
| 65 | +``` |
| 66 | + |
| 67 | +**Using Node.js http-server:** |
| 68 | +```bash |
| 69 | +npm install -g http-server |
| 70 | +http-server |
| 71 | +``` |
| 72 | + |
| 73 | +3. Open your browser and navigate to: |
| 74 | +``` |
| 75 | +http://localhost:3000 |
| 76 | +``` |
| 77 | +*(Port may vary depending on your server)* |
| 78 | + |
| 79 | +## Usage |
| 80 | + |
| 81 | +### Basic Workflow |
| 82 | + |
| 83 | +1. **Select an Icon** |
| 84 | + - Click "Choose Icon" to open the icon picker |
| 85 | + - Search for icons by name (e.g., "github", "twitter", "gaming") |
| 86 | + - Click an icon to select it |
| 87 | + |
| 88 | +2. **Customize the Gradient** |
| 89 | + - Choose between Linear or Radial gradient types |
| 90 | + - Drag color stops on the gradient bar to reposition them |
| 91 | + - Click stops to change their colors |
| 92 | + - Add or remove stops using the buttons |
| 93 | + - Apply preset gradient styles (Smooth, Glossy, Vibrant, Subtle) |
| 94 | + |
| 95 | +3. **Adjust Icon Settings** |
| 96 | + - Set icon color using the color picker |
| 97 | + - Adjust icon size (20-80%) |
| 98 | + - Fine-tune vertical offset (-30% to +30%) |
| 99 | + |
| 100 | +4. **Export Your Icon** |
| 101 | + - Choose export size (72, 144, or 256 pixels) |
| 102 | + - Set corner radius (0-28px) |
| 103 | + - Enter a custom filename |
| 104 | + - Click "Export PNG" or "Export All Sizes" |
| 105 | + - Alternatively, use "Copy" to copy directly to clipboard |
| 106 | + |
| 107 | +### Gradient Randomizer |
| 108 | + |
| 109 | +1. **Basic Randomization:** |
| 110 | + - Click "Randomize Gradient" to generate a random gradient |
| 111 | + |
| 112 | +2. **Color-Based Randomization:** |
| 113 | + - Select a base color in the "Random base color" picker |
| 114 | + - Click "Randomize Gradient" to generate variations based on that color |
| 115 | + - For grayscale base colors (low saturation), generates grayscale gradients |
| 116 | + - For colorful base colors, generates same-hue gradients with varying lightness |
| 117 | + |
| 118 | +3. **Clear Base Color:** |
| 119 | + - Click the "×" button to return to fully random gradients |
| 120 | + |
| 121 | +### Preset Management |
| 122 | + |
| 123 | +1. **Save a Preset:** |
| 124 | + - Configure your desired gradient |
| 125 | + - Click the save button (💾) next to the preset dropdown |
| 126 | + - Enter a name for your preset |
| 127 | + |
| 128 | +2. **Load a Preset:** |
| 129 | + - Select a preset from the dropdown menu |
| 130 | + - The gradient will automatically apply |
| 131 | + |
| 132 | +3. **Delete a Preset:** |
| 133 | + - Select the preset you want to delete |
| 134 | + - Click the delete button (🗑️) |
| 135 | + |
| 136 | +## Keyboard Shortcuts |
| 137 | + |
| 138 | +| Shortcut | Action | |
| 139 | +|----------|--------| |
| 140 | +| `Ctrl + I` | Open icon picker | |
| 141 | +| `Ctrl + E` | Export current icon | |
| 142 | +| `Ctrl + R` | Randomize gradient | |
| 143 | +| `↑` / `↓` | Adjust active value by ±1 | |
| 144 | +| `Shift + ↑` / `↓` | Adjust active value by ±10 | |
| 145 | +| `+` / `-` | Increase/decrease active value | |
| 146 | +| `Esc` | Close icon picker | |
| 147 | + |
| 148 | +## Technology Stack |
| 149 | + |
| 150 | +### Frontend |
| 151 | +- **Vanilla JavaScript (ES6 Modules)** - No framework dependencies |
| 152 | +- **HTML5 Canvas API** - Real-time icon rendering |
| 153 | +- **CSS3** - Modern styling with gradients and animations |
| 154 | + |
| 155 | +### Browser APIs |
| 156 | +- **IntersectionObserver API** - Efficient lazy loading of icons |
| 157 | +- **File System Access API** - Custom save file locations |
| 158 | +- **LocalStorage API** - State and preset persistence |
| 159 | +- **Clipboard API** - Copy to clipboard functionality |
| 160 | + |
| 161 | +### Development Tools |
| 162 | +- **Git** - Version control |
| 163 | +- **npx serve** - Local development server |
| 164 | + |
| 165 | +## Project Structure |
| 166 | + |
| 167 | +``` |
| 168 | +streamdeck-icon-generator/ |
| 169 | +├── index.html # Main HTML file |
| 170 | +├── README.md # This file |
| 171 | +├── .gitignore # Git ignore patterns |
| 172 | +│ |
| 173 | +├── public/ |
| 174 | +│ ├── icons/ |
| 175 | +│ │ └── fontawesome/ # FontAwesome SVG icons |
| 176 | +│ │ ├── index.json # Icon index for lazy loading |
| 177 | +│ │ └── *.svg # 549 SVG icon files |
| 178 | +│ └── presets/ # User-saved gradient presets |
| 179 | +│ |
| 180 | +├── src/ |
| 181 | +│ ├── js/ |
| 182 | +│ │ ├── app.js # Main entry point |
| 183 | +│ │ ├── state.js # Application state management |
| 184 | +│ │ ├── ui.js # UI controls and canvas rendering |
| 185 | +│ │ ├── icons.js # Icon picker with lazy loading |
| 186 | +│ │ ├── gradient.js # Gradient controls and randomization |
| 187 | +│ │ ├── export.js # PNG export functionality |
| 188 | +│ │ ├── storage.js # LocalStorage persistence |
| 189 | +│ │ ├── presets.js # Preset management |
| 190 | +│ │ └── keyboard.js # Keyboard shortcuts |
| 191 | +│ │ |
| 192 | +│ └── styles/ |
| 193 | +│ ├── base.css # Core styles and layout |
| 194 | +│ └── modal.css # Icon picker modal styles |
| 195 | +│ |
| 196 | +└── assets/ |
| 197 | + └── ui/ # Additional UI assets (if any) |
| 198 | +``` |
| 199 | + |
| 200 | +## Browser Compatibility |
| 201 | + |
| 202 | +| Browser | Minimum Version | Notes | |
| 203 | +|---------|----------------|-------| |
| 204 | +| Chrome | 86+ | Full support including File System Access API | |
| 205 | +| Edge | 86+ | Full support including File System Access API | |
| 206 | +| Firefox | 78+ | File System Access API falls back to download | |
| 207 | +| Safari | 14+ | File System Access API falls back to download | |
| 208 | +| Mobile Safari | 14+ | Limited File System Access API support | |
| 209 | +| Chrome Android | 86+ | Limited File System Access API support | |
| 210 | + |
| 211 | +**Note:** File System Access API is not fully supported in Firefox and Safari. The app gracefully falls back to standard download behavior. |
| 212 | + |
| 213 | +## Performance Optimizations |
| 214 | + |
| 215 | +- **SVG Caching**: Loaded SVG icons are cached in a Map for instant re-use |
| 216 | +- **Lazy Loading**: Icons are only loaded when scrolled into view (100px margin) |
| 217 | +- **Debounced Search**: Search filtering is debounced to 200ms |
| 218 | +- **Auto-Save**: Settings are auto-saved with 500ms debounce |
| 219 | +- **Optimized Rendering**: Canvas updates only when necessary |
| 220 | + |
| 221 | +## Accessibility Features |
| 222 | + |
| 223 | +- **Semantic HTML**: Proper use of `<header>`, `<main>`, `<section>`, `<fieldset>`, and `<legend>` |
| 224 | +- **ARIA Labels**: Comprehensive ARIA labels and roles for screen readers |
| 225 | +- **Keyboard Navigation**: Full keyboard support with focus management |
| 226 | +- **Skip Navigation**: Skip-to-content link for screen reader users |
| 227 | +- **Touch-Friendly**: Minimum 44px touch targets on mobile |
| 228 | +- **Focus Indicators**: Clear focus states for all interactive elements |
| 229 | +- **Live Regions**: ARIA live regions for dynamic content updates |
| 230 | +- **Color Contrast**: WCAG-compliant color contrast ratios |
| 231 | + |
| 232 | +## Contributing |
| 233 | + |
| 234 | +Contributions are welcome! Here's how you can help: |
| 235 | + |
| 236 | +1. Fork the repository |
| 237 | +2. Create a feature branch (`git checkout -b feature/amazing-feature`) |
| 238 | +3. Commit your changes (`git commit -m 'Add amazing feature'`) |
| 239 | +4. Push to the branch (`git push origin feature/amazing-feature`) |
| 240 | +5. Open a Pull Request |
| 241 | + |
| 242 | +### Development Guidelines |
| 243 | + |
| 244 | +- Use vanilla JavaScript (no dependencies) |
| 245 | +- Follow ES6 module patterns |
| 246 | +- Maintain accessibility standards |
| 247 | +- Test on multiple browsers and devices |
| 248 | +- Update documentation for new features |
| 249 | + |
| 250 | +## License |
| 251 | + |
| 252 | +This project is open source and available under the [MIT License](LICENSE). |
| 253 | + |
| 254 | +## Acknowledgments |
| 255 | + |
| 256 | +- **FontAwesome** - Icon library provider |
| 257 | +- **Stream Deck** - Inspiration for icon dimensions and use case |
| 258 | + |
| 259 | +## Support |
| 260 | + |
| 261 | +If you encounter any issues or have questions: |
| 262 | + |
| 263 | +1. Check the [Issues](https://github.com/SyntaxSidekick/Stream-Deck-Icon-Generator/issues) page |
| 264 | +2. Open a new issue with detailed information |
| 265 | +3. Include browser version, OS, and steps to reproduce |
| 266 | + |
| 267 | +## Roadmap |
| 268 | + |
| 269 | +Future enhancements under consideration: |
| 270 | + |
| 271 | +- Custom SVG upload support |
| 272 | +- Text overlay options |
| 273 | +- Pattern/texture backgrounds |
| 274 | +- Gradient animation presets |
| 275 | +- Icon effect filters (shadow, glow, blur) |
| 276 | +- Template library |
| 277 | +- Bulk icon generation |
| 278 | +- Plugin system for custom generators |
| 279 | + |
| 280 | +--- |
| 281 | + |
| 282 | +**Made with ❤️ for the Stream Deck community** |
0 commit comments