Golden Ratio & Scale API
Design-proportion maths as an API, computed locally and deterministically. The divide endpoint splits a length by the golden section, the division beloved of artists and designers in which the whole is to the longer part as the longer is to the shorter, both ratios equal to φ = (1+√5)/2 ≈ 1.618 — so 100 splits into a 61.8 longer segment and a 38.2 shorter one — and can also extend a single segment to its larger or smaller golden partner. The rectangle endpoint gives the other side and the area of a golden rectangle from either side, the shape that leaves a smaller golden rectangle when you remove a square. The scale endpoint builds a modular (typographic) scale — base · ratio^step across a range of steps up and down — for harmonious type sizes and spacing, taking a numeric ratio or a named musical one such as minor-third (1.2), major-third (1.25), perfect-fourth (1.333) or golden (φ); a 16-base major-third scale gives 16, 20, 25, 31.25 and so on. Lengths are unit-agnostic. Everything is computed locally and deterministically, so it is instant and private. Ideal for graphic-design, web-design, UI, typography, layout and architecture app developers, type-scale and proportion tools, and design systems. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is proportion and scale; for pixel-density and print sizing use a PPI/DPI API.
api.oanor.com/goldenratio-api