Skip to content

ASCII Charm is a powerful, interactive Go CLI + library for converting images into high‑quality ASCII art

License

Notifications You must be signed in to change notification settings

M1chlCZ/asciicharm-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASCII Charm

ASCII Charm is a powerful, interactive Go CLI + library for converting images into high‑quality ASCII art — with live tuning, multiple dithering algorithms, color support, and export formats ready for GitHub or the web.

Built with:

  • Go – blazing fast image processing
  • 🎨 Charmbracelet (Bubble Tea + Lipgloss) – modern TUI experience
  • 🖼 Disintegration/Imaging – high quality resizing

✨ Features

  • 🧠 Advanced ASCII rendering engine
  • 🎛 Live interactive TUI editor (arrow-key controlled)
  • 🎨 Truecolor ANSI output
  • 🖌 Multiple dithering algorithms:
    • None
    • Floyd-Steinberg
    • Atkinson
    • Riemersma
    • Ordered 2×2
    • Ordered 4×4
    • Threshold
  • 🔡 Multiple ASCII character sets
  • 📁 Image picker with keyboard navigation
  • ✍ Manual image path input
  • 💾 Export formats:
    • HTML
    • Markdown (GitHub-compatible)
    • Colored Markdown

🖥 Preview

Below is an example generated using ASCII Charm:

Example output generated by ASCII Charm:

ASCII Art

View full ASCII artwork here: pic.md


🚀 Installation

go install github.com/M1chlCZ/asciicharm-go@latest

Or clone directly:

git clone https://github.com/M1chlCZ/asciicharm-go
cd asciicharm-go
go build

🎛 Usage (CLI)

asciicharm-go

Controls

Key Action
↑ / ↓ Change selected value
← / → Switch parameter
s Save as HTML
m Save as Markdown
p Enter manual image path
o Pick another image
q Quit

🧩 Usage as Go Package

ASCII Charm is also usable as a standalone image-to-ASCII generator.

Import

import "github.com/M1chlCZ/asciicharm-go/pkg/ascii"

Example

img, _ := imaging.Open("image.png")

cfg := ascii.DefaultConfig()
cfg.Resolution = 0.3
cfg.Colored = true
cfg.Dithering = ascii.DitheringFloydSteinberg

result, err := ascii.ConvertImage(img, cfg)
if err != nil {
    panic(err)
}

fmt.Println(result.ToANSI())

Export formats

result.ToHTML()
result.ToMarkdown()
result.ToMarkdownColored()

🎯 Use Cases

  • Terminal art generators
  • GitHub README visualizers
  • Retro UI builders
  • Game engines / roguelike map renderers
  • Static site art banners
  • Creative coding tools

📜 License

MIT License — free to use, modify, and share.


💡 Future ideas

  • Saved to bash scripts
  • More dithering algorithms
  • Webcam live ASCII
  • GIF → ASCII animation
  • Web UI frontend
  • Shader-like filters
  • Side-by-side preview mode

Made with ❤️ and too much coffee and zyn by Michal Žídek

If you find this project useful consider giving it a ⭐ on GitHub OR buy me a coffee:

Buy Me a Coffee

About

ASCII Charm is a powerful, interactive Go CLI + library for converting images into high‑quality ASCII art

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Packages

No packages published

Languages