Sign In

design-math

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

design-math

Agent-friendly design math CLI for color, typography, and shadow systems.

Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

design-math

Agent-friendly design math CLI built in Rust.

design-math focuses on deterministic design calculations that are easy for humans to inspect and easy for agents, scripts, and CI to consume.

What it does

  • Color conversion, contrast, palette, and scheme generation
  • Typography scale and fluid type calculations
  • Shadow token generation for light and dark surfaces
  • JSON, CSS, HTML, and PNG export paths for automation workflows

Install

Cargo

cargo install design-math

If you build from source and want PNG export support:

cargo install design-math --features image

npm

npx design-math color convert "#c96442" --json

Homebrew

brew install eric8810/design-math/design-math

Quick examples

design-math color convert "#c96442" --json
design-math color contrast "rgba(255,255,255,0.72)" "#111111" --json
design-math color palette --bg "#f5f4ed" --fg "#141413" --brand "#c96442" --format css
design-math type scale --base 16 --ratio major-third --json
design-math shadow generate --levels 5 --json

Packages

  • design-math: end-user CLI crate
  • design-math-core: shared Rust library used by the CLI and future bindings

Status

Core calculation milestones through M6 are implemented. The current focus is packaging, release automation, and bindings for agent-first workflows.

Keywords

command-line-utilities

FAQs

Package last updated on 06 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts