TinyVG / specification

The specification for TinyVG. This is the central authority for the file system
https://tinyvg.tech/
MIT License
239 stars 6 forks source link

[Proposal] Add color names #36

Closed robert-ancell closed 5 months ago

robert-ancell commented 5 months ago

A renderer might want to use one TVG file to render multiple similar images that differ by an accent color. To allow this I propose adding optional names to the color table. Suggested format:

Header:

...
color_count VarUInt
color_name_count VarUInt

Color Name:

color_index VarUInt
name_length VarUInt
name [name_length]u8
robert-ancell commented 5 months ago

Alternatives considered:

ikskuh commented 5 months ago

I don't think this is a feature that suits TinyVG well, as it already is an application specific thing, and you can then also just use a well-defined index instead of a name, making the tooling such that it preserves well-defined indices. Remind yourself that you could also just implement a custom color encoding and use names instead of RGBA values directly