I would like to know what solutions are available for color palette handling in LaTeX. This is needed for a custom package I want to write. (I plan to use tikz and luatex, so any tikz- or lua-solution would be perfect.)
Ideally, the following functionalities would be made available by the color palette system:
- A List of the colors that are to be implemented in a palette type can be defined. Different palette type have different list of colors. Example: a figure palette type must define a color for the label, one for the number of the label, one for the border of the framebox around the image, etc. A footnote palette type must define a color for the footnote reference, one for the footnote text, etc.
- A fall-back color exists for all colors (a fall-back palette?). So colors that are not explicitly defined in the palette fall-back to the default option.
- New palettes can be saved (to a file or database), shared between LaTeX users and loaded (through package options or through commands mid-document to change the main palette for the rest of the document)
- Optional argument (for example pgfkeys key-value) can be provided to some of the commands defined in the package to override the color of the palette currently in use (mdframed like styling options)
N.B. Beamer as a similar system (however, I could not found a specific package to this and some functionalities are missing).
N.B.2 mdframed has a similar system (which could provide all the wanted functionalities but, again, I could not find a specific package that would implement this)
Are there any packages that do implement the 4 functionalities described above? If not, what is the best way to implement them (lua, pgfkeys, other?)