Download the PHP package awcode/awcolor without Composer
On this page you can find all versions of the php package awcode/awcolor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package awcolor
awColor
A modern, dependency-free PHP color management library: convert, manipulate, build palettes and check accessibility across hex, rgb(a), hsl(a), hsv, cmyk and CSS named colors.
Requirements
- PHP 8.2, 8.3 or 8.4
- No runtime dependencies
Installation
Quick start
Manipulation (immutable, chainable)
Palettes
WCAG accessibility
Comparison & serialization
Backwards compatibility
The original public API is preserved:
new awColor($hex)/new awColor($r, $g, $b)/new awColor($h, $s, $l, true)- Static helpers
formatHex,rgbToHex,hexToRgb,rgbToHsl,hslToRgb,hexToHsl,hslToHex - Instance helpers
getHex/getRgb/getR/G/B/getHsl/getH/S/L,setHex/setRgb/setHsl/setR/G/B,isLight/isDark/isGrey,complementary()
Two long-standing bugs were fixed in the process:
hslToRgb()now returns 0-255 integers instead of 0-1 floats (which causedrgbToHex()to always return black for HSL-derived values).setHsl()previously wrote to a typo'd_rbgproperty — it now correctly updates_rgband_hex.
Testing
All versions of awcolor with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.3.0
The package awcode/awcolor contains the following files
Loading the files please wait ...

