Harmony Triangle is a reference implementation and interactive visualization of a novel color space design system, building on James Clerk Maxwell’s 1874 color triangle. This repository provides both a production-ready Next.js 14 + WebGL web app and a TypeScript toolchain for generating publication-quality figures.
Developed alongside the forthcoming arXiv paper, which details the theoretical and historical foundations of the Harmony Triangle.
- Interactive barycentric triangle renderer
- sRGB / Display-P3 space toggle (with live badge)
- Draggable probe showing barycentric weights, hex color, and copy-to-JSON
- PNG export (color-managed, space-aware)
- TypeScript toolchain (
/figures
) for generating publication-quality PNGs and CSV data - Shared color-math utilities and JSON-configured anchors
git clone https://github.com/Paul-W-Marshall/harmony-triangle.git
cd harmony-triangle/web
npm install
npm run dev
Visit http://localhost:3000 in your browser.
cd ../figures
npm install
npm run build && npm run generate
This project is pre-configured for Vercel deployment.
- Root Directory:
/web
- Build Command:
npm run build
- Output Directory:
.next
- Public repository for reproducibility and scholarly citation.
- Full commit history preserved.
- Original private archival repository referenced in the paper's Appendix/Provenance section.
- Based on James Clerk Maxwell’s 1874 color triangle (Maxwell, J.C., "On the Theory of Compound Colours," 1860).
- Please cite the associated arXiv paper (link forthcoming).
How to Cite
When citing this project, please use the following format (update when arXiv DOI is available):
@software{marshall_harmonytriangle,
author = {Paul Warrington Marshall},
title = {Harmony Triangle: Reference Implementation and Visualization},
year = {2024},
url = {https://github.com/Paul-W-Marshall/harmony-triangle},
note = {arXiv preprint forthcoming}
}
- Code: MIT
- Paper: CC BY 4.0
- Figures: CC BY-NC 4.0
See LICENSE files in root and subdirectories for details.
Contributions are welcome! Please open an issue or pull request for suggestions, improvements, or bug reports.
For questions or academic inquiries, please contact Paul Warrington Marshall or open an issue in this repository.
Credit to James Clerk Maxwell for the foundational work on color triangles.