Skip to content

Instantly share code, notes, and snippets.

View Kirkman's full-sized avatar

Josh Renaud Kirkman

View GitHub Profile
@Kirkman
Kirkman / ansi_art_converter.py
Last active August 26, 2016 01:33 — forked from jdiaz5513/ascii_arty.py
Console ANSI Art Generator
#! /usr/bin/env python2
# -*- coding: utf-8 -*-
#
# This routine is adapted from: https://gist.github.com/jdiaz5513/9218791
#
# Things I changed:
# * Cache the results of color_distance() lookups, for a big speed-up.
# * Adjusted the RGB values for ANSI_COLORS to match original CGA values
# * Changed default fill character to a PC-ANSI shaded block character
# * Added some timer code to help with optimizing the conversion routine