Skip to content

Reference implementation and interactive visualization of the Harmony Triangle — a novel color space design system building on James Clerk Maxwell’s 1874 color triangle. Includes sRGB and Display-P3 support, figure-generation scripts, and a WebGL web app. Developed in parallel with the accompanying arXiv paper.

License

Notifications You must be signed in to change notification settings

Paul-W-Marshall/harmony-triangle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Harmony Triangle

License: MIT Vercel

Overview

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.


Features

  • 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

Quick Start

1. Clone and Install

git clone https://github.com/Paul-W-Marshall/harmony-triangle.git
cd harmony-triangle/web
npm install

2. Run the Web App

npm run dev

Visit http://localhost:3000 in your browser.

3. Generate Figures

cd ../figures
npm install
npm run build && npm run generate

Deployment

This project is pre-configured for Vercel deployment.

  • Root Directory: /web
  • Build Command: npm run build
  • Output Directory: .next

Provenance and Citations

  • 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}
}

License

See LICENSE files in root and subdirectories for details.


Contributing

Contributions are welcome! Please open an issue or pull request for suggestions, improvements, or bug reports.


Contact

For questions or academic inquiries, please contact Paul Warrington Marshall or open an issue in this repository.


Acknowledgements

Credit to James Clerk Maxwell for the foundational work on color triangles.


About

Reference implementation and interactive visualization of the Harmony Triangle — a novel color space design system building on James Clerk Maxwell’s 1874 color triangle. Includes sRGB and Display-P3 support, figure-generation scripts, and a WebGL web app. Developed in parallel with the accompanying arXiv paper.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published