GitPedia
ozdemirburak

ozdemirburak/iris

PHP library for color manipulation and conversion.

20 Releases
Latest: 4mo ago
4.1.1Latest
ozdemirburakozdemirburak·4mo ago·February 16, 2026
GitHub

Fixes incorrect param type for PHPStan.

4.1.0
ozdemirburakozdemirburak·6mo ago·December 5, 2025
GitHub

📋 Changes

  • 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.1
ozdemirburakozdemirburak·6mo ago·December 2, 2025
GitHub

📋 Changes

  • 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.0
ozdemirburakozdemirburak·6mo ago·December 2, 2025
GitHub

💥 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.1
ozdemirburakozdemirburak·3y ago·February 22, 2023
GitHub

📋 Changes

  • Using float instead of int to avoid warnings @jaulz
3.1.0
ozdemirburakozdemirburak·3y ago·February 8, 2023
GitHub

📋 Changes

  • Use float instead of int to avoid warnings @jaulz
  • Fixes for issues #39
2.5.0
ozdemirburakozdemirburak·4y ago·February 13, 2022
GitHub

📋 Changes

  • 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
3.0.0
ozdemirburakozdemirburak·4y ago·February 8, 2022
GitHub

📋 Changes

  • 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.4.0
ozdemirburakozdemirburak·4y ago·October 5, 2021
GitHub

Added new Hexa class, fixes issue #28, thanks to @amnuts.

2.3.1
ozdemirburakozdemirburak·5y ago·January 30, 2021
GitHub

Changed HSL to HSV conversion method, fixes issue #27.

2.3.0
ozdemirburakozdemirburak·5y ago·December 6, 2020
GitHub

📋 Changes

  • Support PHP 8.0, fixes issue #26.
2.2.0
ozdemirburakozdemirburak·5y ago·October 11, 2020
GitHub

📋 Changes

  • Added [fade](https://github.com/ozdemirburak/iris#fade), [fadeIn](https://github.com/ozdemirburak/iris#fadein), and [fadeOut](https://github.com/ozdemirburak/iris#fadeout) methods.
2.1.0
ozdemirburakozdemirburak·6y ago·April 14, 2020
GitHub

📋 Changes

  • Remove PHP 7.1 support
  • Allow more than two precision for alpha @dtSniper
2.0.1
ozdemirburakozdemirburak·6y ago·October 19, 2019
GitHub

📋 Changes

  • Added full list of CSS colours, thanks to @amnuts.
2.0.0
ozdemirburakozdemirburak·6y ago·October 12, 2019
GitHub

📋 Changes

  • Remove support for PHP 7.0 and below
  • Added new [factory method](https://github.com/ozdemirburak/iris#via-factory) for detecting and parsing color format when format is unknown @amnuts
  • Upgrade to phpunit 8, updated tests for phpunit 9 deprecations.
1.2.1
ozdemirburakozdemirburak·7y ago·October 7, 2018
GitHub

Added tint and shade methods.

1.2.0
ozdemirburakozdemirburak·8y ago·April 8, 2018
GitHub

Added `isLight` and `isDark` methods.

1.1.1
ozdemirburakozdemirburak·8y ago·October 3, 2017
GitHub

Improved code coverage.

1.1.0
ozdemirburakozdemirburak·8y ago·October 3, 2017
GitHub
1.0.0
ozdemirburakozdemirburak·9y ago·May 30, 2017
GitHub