ozdemirburak/iris
PHP library for color manipulation and conversion.
4.1.2
2.0M downloads/mo
#3452 most downloaded on Packagist
ozdemirburak/iris
What this package is like to depend on
Last release 20 days ago
03 Aug 2026
Release timing varies
gaps range from 2 weeks to 2.8 years
Some releases are documented
notes for 10 of 21 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
21 releases · first in 2017
5 releases in the last 12 months
see the full history below
Release timeline
21 releases · May 2017 to Aug 2026Releases
latest 21-
4.1.203 Aug 2026 -
4.1.107 Jan 2026 -
4.1.005 Dec 2025Release notes
Open source →Added gradient() method for generating color scales (#51, #50)
- Supports two-color gradients: $colorA->gradient($colorB, $steps)
- Supports multi-color gradients with pivots: $colorA->gradient([$colorB, $colorC], $steps)
- Works with all color types (Hex, RGB, HSL, HSV, CMYK, OKLCH, RGBA, HSLA)
- Returns array of colors matching the starting color type
- Added comprehensive tests for all color types and edge cases
-
4.0.102 Dec 2025Release notes
Open source →Fixed OKLCH parsing, accepting both comma and space separated formats.
- Support CSS Color Level 4 space-separated syntax: oklch(40.1% 0.123 21.57)
- Continue supporting comma-separated syntax: oklch(70%, 0.15, 150)
- Alpha values in input are parsed but ignored (e.g., oklch(50% 0.1 180 / .5))
-
4.0.002 Dec 2025Release notes
Open source →A major release bringing modern PHP support and a new color space. This version requires PHP 8.1+ and introduces OKLCH, a perceptually uniform color space, which is ideal for creating accessible color palettes and smooth gradients.
Breaking Changes
- Minimum PHP version is now 8.1
- Removed Travis CI configuration
- Removed EditorConfig and PHP CodeSniffer
New Features
- OKLCH Color Space: Added full support for the perceptually uniform OKLCH color format
- Parse OKLCH strings:
new Oklch('oklch(70%, 0.15, 150)') - Convert any color to OKLCH:
$hex->toOklch() - Convert OKLCH to all other formats (Hex, RGB, HSL, etc.)
- Factory support for OKLCH strings
Bug Fixes
- Fixed RGBA to HEXA conversion preserving original RGB values (#37)
- Fixed HSLA to HEXA conversion preserving original alpha value (#48)
Improvements
- Updated PHPUnit to
^10.5|^11.0 - Converted all test annotations to PHP 8 attributes
Currently Supported Formats
Hex, Hexa, RGB, RGBA, HSL, HSLA, HSV, CMYK, OKLCH
-
3.1.122 Feb 2023 -
3.1.008 Feb 2023 -
3.0.008 Feb 2022Release notes
Open source →- Remove PHP 7 support, will only support PHP 8
- Added type hinting and return type declarations
- Made BaseColor::back() and BaseColor::getColorModelName() public @rv1971
- Use non-locale aware output for the alpha value @Jako
- Updated .gitignore, and some code refactoring @kudashevs
-
2.5.013 Feb 2022Release notes
Open source →- Made BaseColor::back() and BaseColor::getColorModelName() public, added mixInHsv() @rv1971
- Use non-locale aware output for the alpha value @Jako
- Updated .gitignore, and some code refactoring @kudashevs
-
2.4.005 Oct 2021 -
2.3.130 Jan 2021Nothing published for this version
-
2.3.006 Dec 2020Nothing published for this version
-
2.2.011 Oct 2020Nothing published for this version
-
2.1.014 Apr 2020Nothing published for this version
-
2.0.119 Oct 2019Nothing published for this version
-
2.0.012 Oct 2019Nothing published for this version
-
1.2.107 Oct 2018Nothing published for this version
-
1.2.008 Apr 2018Nothing published for this version
-
1.1.103 Oct 2017Nothing published for this version
-
1.1.003 Oct 2017Nothing published for this version
-
1.0.030 May 2017Nothing published for this version