Skip to content

xterm-256color support #17

Open
Open
@cmang

Description

@cmang

It would be nice for libansilove to support these escape codes for the xterm-256color palette.

Examples of ANSI editors that export ANSI to this format include Durdraw, which also does Ansilove exporting. This would allow Durdraw to export PNG and GIF files in 256 color, instead of just 16 color. This would also allow sites like 16colo.rs to view these files correctly.

I am looking at the source code... I think the trick would be something like:

1: In config.h: Add the xterm-256color palette as 8-bit hex values
2: In ansi.c: Add interpreters for the 256 color escape codes, the palette generator, and any other logic to deal with color values larger than 16.
3: ???
4: profit!

If I get some time I will give it a try, or if someone else wants to. This can probably be considered a duplicate of issue ansilove/ansilove#43.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions