Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Color Laravel Package

spatie/color

PHP library for color parsing, conversion, and comparison. Supports CSS named colors plus RGB/RGBA/ARGB, Hex, HSL/HSLA, HSB, CMYK, CIELab, and XYZ. Includes WCAG contrast ratio and Delta E distances (CIE76, CIE94, CIEDE2000).

View on GitHub
Deep Wiki
Context7
2.1.0
v2.0.0

What's Changed

Breaking Changes

  • Require PHP 8.2 or higher (dropped support for PHP 7.x, 8.0, 8.1)
  • Removed Hsla::contrast() method (was broken)
  • Added return type hints to Color interface - custom implementations must add:
    • fromString(): static
    • red(): int|string
    • green(): int|string
    • blue(): int|string

Improvements

  • Modernized codebase with constructor property promotion
  • Upgraded to Pest 4 and PHPUnit 11
  • Tests now run on PHP 8.2, 8.3, 8.4, and 8.5
  • Cleaned up README badges

Full Changelog: https://github.com/spatie/color/compare/1.5.3...v2.0.0

1.8.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/color/compare/1.7.0...1.8.0

1.7.0

What's Changed

Full Changelog: https://github.com/spatie/color/compare/1.6.3...1.7.0

1.6.3

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/color/compare/1.6.2...1.6.3

1.6.2

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/color/compare/1.6.1...1.6.2

1.6.1

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/color/compare/1.6.0...1.6.1

1.6.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/color/compare/1.5.3...1.6.0

1.5.3

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/color/compare/1.5.2...1.5.3

1.5.2

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/color/compare/1.5.1...1.5.2

1.5.1
1.4.0
  • Added support for PHP 8
  • Added support for CMYK & HSB
  • Added support for HEX alpha channel
  • Added support for 3-digit HEX values
1.3.1
  • Fix HEX/HSL conversion bug
1.3.0
  • Added CIELab and XYZ color formats and Distance API
  • Added Contrast API
1.2.4
  • Fixed division by zero error on pure white/black convertions (#42)
1.2.3
  • Added support for PHP 8
1.2.2
  • Fix transform RGB value to HSL : division by zero (#38)
1.2.1
  • HSL to RGB fixes
1.2.0
  • Added HSL & HSLA support
1.1.1
  • Fixed validation when a color contained redundant characters at the beginning or end of the string
1.1.0
  • All color formats now implement a Color interface
  • Added a Factory class with a fromString static method to guess a format
  • rgb and rgba values can now contain spaces (e.g. rgb(255, 255, 255))
1.0.2
  • rgbChannelToHexChannel now also accepts single single-digit hex values
1.0.1
  • Bugfix (breaking!): Alpha channel values are now a float between 0 and 1
1.0.0
  • First release
What's
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport