Start with PHPColor

Install PHPColor and take the six-step tour, from creating your first color to composing palettes and gradients.

  1. Install PHPColor

    Install PHPColor and verify that Composer loads it correctly.
  2. Create colors

    Construct colors from channel values or names, and parse supported concrete CSS colors into the same objects.
  3. The color object

    One interface for every space: properties, operations, conversion.
  4. Compare colors

    Measure perceptual distance, check WCAG contrast, test equality.
  5. Compose

    Expand a single color into palettes, harmonies, and gradients.
  6. Ship CSS

    Emit modern CSS with an sRGB fallback, derive a dark theme, and build contextual expressions for the browser.

Build your first PHPColor workflow

Start with installation, finish with usable CSS.