DSP Palette
Code, evaluation data, and a public reference implementation for the method.
Implementation
You can try the live implementation of DSP Palette at Véridique.
Michail Semoglou, "Distinctness-First Palette Extraction for Accessible Design Systems," accepted to APSIPA ASC 2026, Track IVM.
Project status
- Accepted paper: APSIPA ASC 2026, Track IVM
- Public research artifact: reproducible code, evaluation pipeline, and dataset split
- Persistent DOI: 10.5281/zenodo.20092216
Abstract
Design systems need color palettes that are perceptually distinct and carry a guaranteed WCAG AA-compliant Surface/On-Surface pair: k-means clustering and median-cut quantization cannot meet these requirements because they optimize solely for reconstruction fidelity. This paper introduces Distinctness-First Palette Selection (DSP), a constrained greedy algorithm that selects n colors by maximizing minimum pairwise ΔE₂₀₀₀ (perceptual distinctness) while enforcing a hard inter-color separation threshold τ and a post-selection WCAG AA contrast check. A heuristic assigns each color a semantic role (Surface, On-Surface, Primary, Secondary, Accent) suited to contemporary design-token schemas.
Evaluated on a held-out test set of N = 75 COCO photographs under four metrics, DSP achieves a mean minimum ΔE₂₀₀₀ of 24.9 ± 5.6 against 14.1 ± 4.9, 12.4 ± 3.8, and 7.2 ± 3.9 for k-Means Lab, k-Means RGB, and Median Cut respectively (all p < 0.001, Wilcoxon signed-rank; Cliff's δ > 0.84, large effect in every case). WCAG AA coverage improves significantly over k-Means Lab and Median Cut (both p < 0.004, Bonferroni-corrected); the gain over k-Means RGB is nominally significant (p = 0.013) but does not survive Bonferroni correction. Rankings hold on a disjoint 25-image COCO train2017 set. Reconstruction error is higher by design: the method trades pixel-level fidelity for perceptual spread. DSP is available as open-source software with a persistent DOI and a reproducible evaluation corpus.
Installation
pip install -r requirements.txt
Repository Structure
dsp/ # DSP method implementation (selector, roles, and metrics)
baselines/ # k-Means Lab, k-Means RGB, Median Cut, and ColorThief
evaluation/ # evaluation runner, metrics, and aggregation scripts
corpus/
manifest.json # image IDs with dev/test split labels
download.py # script to fetch COCO images
results/
raw/ # per-image evaluation JSONs (N = 115)
aggregated/ # CSV summaries and summary_for_paper.md
tables/ # standalone LaTeX table sources (Tables 1–3)
figures/ # pipeline diagnostic figures
tests/ # unit tests
Reproducing the Evaluation
-
Download the corpus images (COCO val2017/train2017, CC BY 4.0):
python corpus/download.py -
Run the evaluation:
python -m evaluation.runner
-
Aggregate results and regenerate figures:
python -m evaluation.report
Pre-computed results are already included in results/ for inspection without re-running.
Running Tests
pytest tests/
Citation
If you use this code or data, please cite:
@software{semoglou_dsp_palette_2026,
author = {Semoglou, Michail},
title = {{DSP Palette: Distinctness-First Palette Extraction for Accessible Design Systems}},
year = {2026},
publisher = {Zenodo},
version = {1.1.0},
doi = {10.5281/zenodo.20092216},
url = {https://doi.org/10.5281/zenodo.20092216}
}
License
MIT — see LICENSE.
Release files for dsp-palette 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dsp_palette-1.1.0.tar.gz | 33.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dsp_palette-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.0 kB
Release files / dsp_palette-1.1.0.tar.gz
| Download URL | dsp_palette-1.1.0.tar.gz |
|---|---|
| Size | 33.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
08041596f99cafee08bf169cd7b68a5496fc08c28ffb70db860477ec5f7d366e
|
|
BLAKE2b-256 checksum How to use checksums |
6dac0815a40a569e7ca47dd625a170f57ac8336c5c9693cfb806a19a5ef1fa62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.
Transparency logRelease files / dsp_palette-1.1.0-py3-none-any.whl
| Download URL | dsp_palette-1.1.0-py3-none-any.whl |
|---|---|
| Size | 22.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f1a0462745e41d87087fc1843b77448859b86d3158ba6b89b4cf5ad27b8c40e3
|
|
BLAKE2b-256 checksum How to use checksums |
54e84d941fb66a0b48bd1af4c8d8dfee415e4711870d9c460c101f18ce120d33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.
Transparency log