Add support for selecting a different color palette
jackwilsdon opened this issue · 3 comments
We should support passing in either a custom palette (e.g. #FF0000,#00FF00
) or a name of one from a pre-defined list of palettes (e.g. retro
, inverted
).
For example; /jackwilsdon?size=128&palette=retro
As an initial stage we could just support custom palettes and split out pre-defined palettes into a different issue.
5e91e5b added partial support for this - the GenerateImage
method now accepts a ppic.Palette
containing foreground and background colors.
We currently just provide the GenerateImage
method with ppic.DefaultPalette
, as it is not yet configurable in the request.
Work-in-progress on the url-palette
branch.
As of 3a2c32b, we now generate a color palette based on the requested source text (it can be disabled by adding ?monochrome
to the URL).
I don't think there's any need for custom palettes now, as this seems to work pretty well as-is.