About PHPColor

Modern color math for PHP, with a small API and tests you can trust.

Why PHPColor

Color deserves careful foundations.

Color conversion, contrast and mixing need models that reflect what people see. PHPColor brings spaces such as OKLCH to PHP through a focused, inspectable library.

Principles

Three principles.

  1. Perceptual first

    Mixing, scales and transformations preserve visual relationships.

  2. Small and dependable

    No runtime dependencies or framework coupling.

  3. Tested releases

    Strict types, tests and review protect every release.