A small Python script to generate colors whose components represent the side lengths of triangles.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-04-23 14:00:12 -04:00
generate.py Add files via upload 2026-04-23 13:59:38 -04:00
LICENSE Initial commit 2026-04-23 13:55:05 -04:00
README.md Update README.md 2026-04-23 14:00:12 -04:00

triangular-colors

A small Python script to generate colors whose components represent the side lengths of triangles.

colors.json is all of these so-called triangular colors in a single file; each entry is an array where the first value is another array representing an RGB value, and the second value is a string, whose value is "a" for an acute triangle, "r" for a Pythagorean right triangle, or "o" for an obtuse triangle.

pythagorean.json, acute.json, and obtuse.json each contain an array with colors representing their respective types of triangles.

For the purposes of this script, an RGB value is a list of three positive integers from 1 to 255, inclusive.

This script depends on the tqdm package from PyPI.