https://github.com/joshalexjacobs/aseprite-ascii-script
Aseprite script that converts a sprite into basic ASCII
https://github.com/joshalexjacobs/aseprite-ascii-script
ascii aseprite aseprite-script aseprite-scripts lua
Last synced: 3 months ago
JSON representation
Aseprite script that converts a sprite into basic ASCII
- Host: GitHub
- URL: https://github.com/joshalexjacobs/aseprite-ascii-script
- Owner: Joshalexjacobs
- License: mit
- Created: 2023-03-02T22:21:49.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-03T00:53:55.000Z (almost 3 years ago)
- Last Synced: 2025-09-01T07:19:03.190Z (5 months ago)
- Topics: ascii, aseprite, aseprite-script, aseprite-scripts, lua
- Language: Lua
- Homepage:
- Size: 2.75 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Aseprite ASCII Script
An Aseprite script that converts a sprite into ASCII.
**Currently this script only works with a single layer. In order to capture the entire sprite, you'll need to merge everything down into one layer before running the script.**
## How To
Clone this repo and place `ASCII.lua` and the `_modules` directory into your Aseprite scripts folder (the script will fail if it can't find `json.lua` in the `_modules` folder).
Next, run the script from within Aseprite via `File > Scripts > ASCII`:

Once finished, there are should be 2 additional files in the directory containing your `.ase` file.
1. A `.json` file that contains color data for each corresponding letter. The more colors you have in your sprite, the more letters should appear here.
_Note: there's currently an untested limit to how many colors a single sprite can support._
```
{
"A":{
"g":82,
"r":36,
"a":255,
"b":59
},
"B":{
"g":175,
"r":93,
"a":255,
"b":141
}
}
```
2. A `.txt` file that contains the ASCII version of your sprite. Each letter displayed here corresponds with the above color key.
```
AAAA
AAAAAA
AAAAAAAAAAAA
AAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAA
AAAAABAAAAAAAAAABAAAAA
AAAAABBBAAAAAAAABBBAAAAA
AAAAAAABAAAAAAAAAABAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAABBBBBBBBBBBBAAAAAAAAAA
AAAAAAAAABBBBBBBBBBBBBBAAAAAAAAA
AAAAAAAAABBBBBBBBBBBBBBAAAAAAAAA
AAAAAAAAABBBBBBBBBBBBBBAAAAAAAAA
AAAAAAAAABBBBBBBBBBBBBBAAAAAAAAA
AAAAAAAAABBBBBBBBBBBBAAAAAAAAA
AAAAAAAAABBBBBBBBBBBBAAAAAAAAA
AAAAAAAAABBBBBBBBBBAAAAAAAAA
AAAAAAAAAAAAAAAAAA
AAAA
```