Search by

js-upup / palette-css-export

js-upup

Export an ordered RGB palette as CSS custom properties.

v0.1.0 2026-11-22 02:08 UTC

This package is not auto-updated.

Last update: 2026-11-22 18:37:03 UTC


README

Convert a named RGB palette into CSS custom properties under a configurable prefix. The exporter accepts an associative array of labels and 8-bit RGB triplets, preserves order, and returns a :root block with hex colors.

Try PicVane's AI Pixel Art Generator to explore a retro color direction from a reference photo. Edit the starting prompt to request a specific color mood while keeping the subject recognizable, then sample the colors you want to carry into your website or game interface.

Usage

use JsUpup\PaletteCss\Exporter;

echo Exporter::customProperties(['sky' => [94, 151, 179], 'sand' => [223, 186, 125]]);

This is an independent utility released under the MIT license.