Download the PHP package wwaz/colormodel-php without Composer
On this page you can find all versions of the php package wwaz/colormodel-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package colormodel-php
colormodel-php
Convert, manipulate, and generate color schemes across all major color spaces — with a clean, chainable PHP API.
What it does
- 10 color models — HEX, RGB, RGBA, HSB, HSV, HSL, CMYK, CMYKInt, CIELab, CIELCh, XYZ
- Fluent conversions — chain from one color space to another in a single expression
- Color manipulation — rotate hue, mix colors with custom weights
- Color schemes — Complementary, Triadic, Tetradic, Square, Analogous, Tint, Tone, Shade
- Flexible input/output — accept strings, arrays, integers, or named colors like
'red'
Examples
1. Cross-Format Conversion Chain
Start with a HEX color, rotate its hue by 180°, and export as CMYK — perfect for generating print-ready complementary colors from web values:
2. Mixing Colors with Custom Weight
Blend two colors in any ratio. Great for generating palette gradients or brand color variations programmatically:
3. Generate a Full Color Scheme
Feed in any color, get back a complete set of harmonious variations — all returned in the same color model you started with:
Color Models
| Model | Channels | Typical use |
|---|---|---|
| HEX | #RRGGBB | HTML / CSS |
| RGB | 0–255 per channel | Screen / digital |
| RGBA | RGB + alpha (0–1) | CSS with transparency |
| HSB/HSV | Hue 0–360°, Sat 0–100, Bri 0–100 | Color pickers |
| HSL | Hue 0–360°, Sat 0–100, Lig 0–100 | CSS / design tools |
| CMYK | 0–1 float per channel | Print (float) |
| CMYKInt | 0–100 int per channel | Print (integer) |
| CIELab | L 0–100, a, b axes | Perceptual color science |
| CIELCh | L, Chroma, Hue | Smooth color gradients |
| XYZ | Device-independent reference | Color math / ICC |
Development
Setup
Quality checks
You can also run the checks individually:
Backward compatibility policy
- Existing public APIs are kept backward-compatible.
- Legacy usage with
new HEX(...)remains supported. - New APIs are added in an additive way to avoid breaking existing integrations.
Contributing
Please see CONTRIBUTING.md for development workflow and pull request expectations.
License
MIT