A Python 3 program that generates HTML pages from stylesheet files.
Input: a SASS stylesheet (.scss), a LESS stylesheet (.less), a GNU Image Manipulation Program palette (.gpl), or an Oomox color scheme file.
Output: an HTML document with boxes of the colors defined in the input file (in
~/.local/share/palpageproducer/output or the equivalent).
git clone https://www.twinkle-night.net/Code/palpageproducer.git
Latest Source (6.3 KiB) | Source signature | SHA256:
Python .egg (11.5 KiB) | .egg signature
Python .whl (19 KiB) | .whl signature
pip install palpageproducer
I made this because I wanted an easy way to see what the colors in a webpage/game/etc. looked like together. Because Palette Page Producer also lists the variable names and hex codes of each color, it also makes it easy to copy a given value (e.g. to throw it into WebAIM’s Color Contrast Checker).
- PPP doesn’t check if the output already exists before overwriting.
- LESS files aren’t as well-tested as the other formats yet and may have strange errors.
- The output uses some fancy CSS features (like
vw) that not all browsers support.
- RGB palette colors are converted to hex output. RGBA colors are ignored entirely.
- If color I.D.s are duplicated (e.g. a GIMP palette with multiple colors named “Untitled”), PPP automatically appends a number to the I.D. to avoid overlap problems. This means that the I.D.s seen in the output may not match to the originals 100%.
- The output uses a
<style>element in the
<head>, rather than creating two separate (.HTML and .CSS) files. Some linters don’t like
<style>tags under any circumstances, so you may get false “invalid” results, but the output is indeed valid HTML5.
I’d like to eventually add command line options to specify column count and output filename, but those aren’t available yet.
Added basic support for Oomox color schemes. (Some selectors are ignored.)
Initial public release.
Copyright 2019 Matthew Ellison.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses or write to:
Free Software Foundation
51 Franklin Street, Fifth Floor
Boston, MA 02110-1335