Skip to content

Type Scale Generator API

POST https://api.findutils.com/api/tools/type-scale-generator/execute

Generate a modular type scale as CSS custom properties. Each step multiplies the one below it by a ratio, so sizes stay in proportion instead of being picked by hand. Ratios are the classical musical intervals from minor-second (1.067, tight) to golden-ratio (1.618, dramatic), or supply custom_ratio. Sizes are emitted in rem against a root size so they respect the reader browser setting, or in px if you ask. Returns the full :root block and every step with its pixel equivalent.

Request body

application/json
  • base

    number optional

    Base body size in px (8 to 48). Default 16. Default 16.

  • ratio

    string optional

    Named ratio. Default major-third (1.25). One of minor-second · major-second · minor-third · major-third · perfect-fourth · augmented-fourth · perfect-fifth · golden-ratio. Default "major-third".

  • custom_ratio

    number optional

    Own ratio between 1.01 and 3. Overrides ratio.

  • steps_up

    integer optional

    How many sizes above the base (1 to 9). Default 5. Default 5.

  • steps_down

    integer optional

    How many sizes below the base (0 to 5). Default 2. Default 2.

  • unit

    string optional

    rem keeps the scale relative to the reader root size; px is fixed. Default rem. One of rem · px. Default "rem".

  • root

    number optional

    Root font size in px used to convert to rem (8 to 32). Default 16. Default 16.

Example arguments

Verified
{
  "base": 16,
  "ratio": "major-third"
}