The Telegram Theme Generator is a client-side web application built with React, TypeScript, and Vite. It processes images locally to generate Telegram Desktop .attheme files, ensuring privacy and performance.
- ImageUploader: Handles file selection, drag-and-drop, and validation.
- ColorExtractor: Uses the HTML5 Canvas API to extract dominant colours from images.
- ThemePreview: Renders a live Telegram chat preview using the generated theme colours.
- ChatBubble/MessageList: Simulate Telegram chat UI for accurate previews.
- ThemeBuilder: Generates the
.atthemefile from extracted colours. - ContrastOptimizer: Ensures all text meets accessibility contrast standards.
- ErrorBoundary/Toast: User-friendly error handling and notifications.
- User uploads image →
- ColorExtractor processes image →
- ThemeBuilder creates theme object →
- ThemePreview updates UI →
- User downloads
.attheme
- All processing is done in-browser; no images or data are sent to any server.
- No cookies, analytics, or external requests.
src/components/– UI components (uploader, preview, chat, etc.)src/core/– Colour extraction, theme generation, contrast logicsrc/utils/– Utility functions and error handlingpublic/– Static assets and sample images
- Modular React components for easy feature addition
- TypeScript types for safety and maintainability
- Easily add new preview layouts or export formats
For more details, see inline code comments and the CONTRIBUTING.md guide.