Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lrstanley opened this issue Nov 6, 2022 · 1 comment
Open

Comments

@lrstanley
Copy link

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:

@mbadolato
Copy link
Owner

Hey that's really cool! I may be able to make use of this sometime in the future!

@lrstanley lrstanley changed the title suggesstion: generare svg color tables that can be embedded into readme suggesstion: generate svg color tables that can be embedded into readme Nov 6, 2022
@lrstanley lrstanley changed the title suggesstion: generate svg color tables that can be embedded into readme suggestion: generate svg color tables that can be embedded into readme Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants