Skip to content

chen201724/mosaic-studio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎨 Mosaic Studio

Transform images into pixel art β€” in your browser.

Every pixel tells a story.

Deploy License: MIT TypeScript

Live Demo Β· Report Bug Β· Request Feature


Mosaic Studio is a browser-based pixel art converter with real-time preview, multiple pixel shapes, color palettes, and GIF animation support. Everything runs client-side β€” no uploads, no server, no tracking.

Features

Core

  • 5 Pixel Shapes β€” Square, Circle, Diamond, Cross-stitch, ASCII art
  • 3 Color Modes β€” Grayscale, Color (quantized RGB), Palette
  • 4 Built-in Palettes β€” Game Boy, NES, Cyberpunk, Retro Brown
  • GIF Support β€” Parse animated GIFs frame-by-frame, export as pixel-art GIF
  • Comparison Slider β€” Drag to compare original vs pixelated (Squoosh-style)
  • Copy to Clipboard β€” One-click copy for PNG images

Design & UX

  • Design Token System β€” 3-layer architecture (Global β†’ Semantic β†’ Component)
  • Brand Color β€” Cool gray palette with blue accent (#60A5FA)
  • Professional Typography β€” Inter + JetBrains Mono (numeric display)
  • Micro-interactions β€” Hover lift, pulse animations, toast feedback
  • Accessibility β€” ARIA roles/labels, keyboard navigation, prefers-reduced-motion
  • Responsive β€” Mobile-optimized with 44px touch targets
  • 100% Client-Side β€” All processing in your browser, privacy guaranteed

Tech Stack

Layer Technology
Framework React 19
Language TypeScript 5.9
Build Vite 7
Rendering Canvas API + OffscreenCanvas
GIF Decode omggif
GIF Encode modern-gif
Fonts Inter, JetBrains Mono (Google Fonts)
Deploy GitHub Pages

Getting Started

Prerequisites

  • Node.js >= 18

Development

git clone https://github.com/chen201724/mosaic-studio.git
cd mosaic-studio
npm install
npm run dev

Build

npm run build
npm run preview  # preview production build locally

How It Works

  1. Image Upload β€” File is read into an HTMLCanvasElement via drawImage()
  2. Pixel Sampling β€” For each pixel block, the center pixel's RGB is sampled
  3. Color Processing β€” Grayscale conversion, RGB quantization, or palette mapping
  4. Shape Rendering β€” Each block is rendered as the selected shape (square, circle, diamond, cross-stitch, or ASCII character)
  5. Comparison β€” Original and processed images are composited on a single canvas with a draggable divider
  6. GIF Processing β€” Each frame is decoded, processed via OffscreenCanvas, then re-encoded

Project Structure

src/
β”œβ”€β”€ main.tsx          # Entry point
β”œβ”€β”€ App.tsx           # Main application component
β”œβ”€β”€ index.css         # Design tokens + styles
└── utils/
    β”œβ”€β”€ mosaic.ts     # Core pixel engine (applyMosaic, processFrame)
    └── gif.ts        # GIF parse/encode utilities

Roadmap

  • 5 pixel shapes (square, circle, diamond, cross-stitch, ASCII)
  • 3 color modes (grayscale, color, palette)
  • 4 built-in palettes (Game Boy, NES, Cyberpunk, Retro)
  • GIF animation preview with play/pause
  • Comparison slider (Squoosh-style)
  • Copy to clipboard
  • Design token system
  • Micro-interactions & toast feedback
  • Accessibility (ARIA, keyboard, reduced motion)
  • Responsive mobile layout
  • Open Graph & SEO meta tags
  • Custom color palette editor
  • Batch processing
  • PWA support
  • Favicon & brand logo
  • OG preview image

History

This project started as a simple pixel mosaic experiment in vanilla JS back in 2019. In 2025, it was rewritten from scratch as a full-featured React + TypeScript application with a professional design system.

Contributing

Contributions are welcome! Please open an issue first to discuss what you'd like to change.

License

MIT


Made by chen201724

About

🎨 Pixel art converter β€” turn images, GIFs and videos into grayscale pixel art

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors