Skip to content

suggestion: generate svg color tables that can be embedded into readme #395

Open
@lrstanley

Description

@lrstanley

I recently created a Go library that uses a large portion of the work done here, and windowsterminalthemes.dev/, for Go-based terminal applications. As part of that, I wanted a simple way of representing all of the color palettes/themes, so I essentially have my code-gen process also generate SVG's that have embedded HTML tables, with all of the colors, and figured this might be something you'd be interested in.

If not, no worries, just figured it might be a bit easier than managing the screenshots, and creates a bit more consistency.

To summarize how I generate this page, it's three parts:

  1. Load theme data.
  2. Generate the SVG using this template, and these helper template functions (primarily just to convert hex to rgba). This could easily be ported into whatever templating engine works best for your codegen solution.
  3. Reference it in the GH markdown like so (width and height being critical).

An example of one of them:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions