innmind/colour
A small PHP library for representing and manipulating colours as immutable value objects. Parse hex, RGB and HSL values, convert between colour models and compare colours with a clean API that fits the Innmind ecosystem.
Adopt when most of the following hold:
ColourService/adapter interface so the vendor type can be swapped later.Look elsewhere when:
For executives: This is a small, focused library that handles colour calculations — the maths behind brand theming, dark-mode palettes, and accessibility contrast checks. It removes a recurring "we'll just write it ourselves" tax from our design-system and accessibility work. Cost is negligible; the real consideration is risk, not price. It is maintained by a single author and its newest release narrows PHP compatibility rather than widening it, so it should be treated as a convenience dependency, never a load-bearing one. Recommendation: adopt behind a thin internal wrapper, pin the version deliberately, and revisit if it blocks a platform upgrade.
For engineering: Framework-agnostic, pure-PHP value objects — no Laravel coupling, no global state, easy to unit test and easy to wrap behind an interface. The 5.2.0 release is effectively a compatibility change: it drops PHP 8.4, so composer resolution will fail for 8.4 environments and those projects must stay on 5.1.0. Before adopting, confirm the supported PHP range against our runtime matrix, decide explicitly whether we pin 5.1.0 or 5.2.0, and record that decision — do not let it float. Our integration surface should be a single adapter class so a future swap is a one-file change.
How can I help you explore Laravel packages today?