3 releases (breaking)

0.2.0 May 27, 2024
0.1.0 May 25, 2024
0.0.1 May 21, 2024

#463 in Images

Download history 13/week @ 2024-07-27 16/week @ 2024-09-21 2/week @ 2024-09-28

127 downloads per month

Apache-2.0

1.5MB
6K SLoC

mabel 🍁

Declarative pixel art. Mabel lets you create tiny pixel art images by writing pixels as characters in a text file!

Here’s a little example that outputs the infamous CS Source missing texture pattern:

size: 64
palette:
c = #000000
s = #ff00dc

-- pixels
cscscscs
scscscsc
cscscscs
scscscsc
cscscscs
scscscsc
cscscscs
scscscsc
-- pixels

css

for an in-depth explanation checkout the Format section.

Installation

crates.io

cargo install mabel

Usage

mabel <input.eno> [-o output.png]

mabel -h for more information.

Format

mabel uses the Eno data language, you can learn more about the Eno format here.

Name Type Required Notes
size u8 No The size of each pixel in the image.
width u32 No The amount of pixels in the x-axis.
height u32 No The amount of pixels in the y-axis.
palette Fieldset No The color palette. Keys are the characters and values are the colors. Keys must be one character long. Colors can be anything that color-art supports.
pixels Multiline Field Yes The image data. Spaces and empty lines are transparent. Characters must be defined in palette.

To see some examples, check out the examples directory.

Aseprite

mabel can convert an aseprite file (.ase/.aseprite) into Eno; allowing you to edit aseprite files with mabel.

mabel aseprite <input.ase> [-o output.eno]

This feature is gated behind an aseprite feature flag. Enabled by default.

Acknowledgements

License

Apache 2.0

Dependencies

~2.5–3.5MB
~66K SLoC