Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Animated Flip Counter GIF Generator

Generate an animated GIF of a digital flip counter styled like a classic split-flap display.

Note: This project was vibe coded with GitHub Copilot.

Features

  • Flip animation from start to target integer
  • Transparent background by default
  • Optional white background (--background white)
  • Built-in style presets (--preset classic|slate|amber|purple|light)
  • No looping by default (stops on target frame)
  • No reflection is rendered in output GIFs
  • Configurable duration, frame rate, dimensions, and output path
  • Zero-pads to the widest digit width between start and target values

Requirements

  • Python 3.9+
  • Pillow (install from requirements.txt)

Install

pip install -r requirements.txt

Usage

python flip_counter_gif.py <start> <target> [options]

Examples

python flip_counter_gif.py 56789 89012
python flip_counter_gif.py 7 123 --duration 1.5 --fps 30 --output out.gif
python flip_counter_gif.py 42 900 --background white --width 1200 --height 500
python flip_counter_gif.py 100 999 --preset amber --output amber_style.gif
python flip_counter_gif.py 100 245 --preset slate --loop --output looping.gif
python flip_counter_gif.py 1200 9876 --preset purple --output purple_style.gif
python flip_counter_gif.py 56789 89012 --preset light --background white --output light_style.gif

Options

  • start: starting integer value (>= 0)
  • target: target integer value (>= 0)
  • --duration: animation length in seconds, from 0.5 to 5.0 (default: 2.0)
  • --fps: frames per second (default: 24)
  • --background: transparent or white (default: transparent)
  • --preset: classic, slate, amber, purple, or light (default: classic)
  • --width: output width in pixels (default: 1200)
  • --height: output height in pixels (default: 500)
  • --output: output GIF path (default: counter_<start>_to_<target>.gif)
  • --loop: loop forever (default: off)

Style Presets

  • classic: closest match to the original dark split-flap look
  • slate: cooler blue-gray styling with softer reflection
  • amber: warm brown/amber styling inspired by vintage displays
  • purple: vibrant purple styling inspired by Nutanix button accents
  • light: light gray cards and dark gray numerals for a white-background UI look

Preset Gallery (0 to 400, Transparent)

Preset Preview
classic classic preset preview
slate slate preset preview
amber amber preset preview
purple purple preset preview
light light preset preview

Generated with:

python flip_counter_gif.py 0 400 --background transparent --preset <preset> --output samples/<preset>_0_to_400.gif

Notes

  • This v1 implementation supports integers only.
  • Very large ranges over short durations may skip visible intermediate values because available frames are finite.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages