jalaljaberi / negarity-color
Negarity Color — a modern, extensible color manipulation library for PHP.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/jalaljaberi/negarity-color
Requires
- php: >=8.2
Requires (Dev)
- phpunit/phpunit: ^10.0
- symfony/var-dumper: ^6.0
This package is not auto-updated.
Last update: 2025-12-11 21:17:57 UTC
README
Chainable: Always keep it possible to chain actions like $color->lighten()->extractChannel('r')->contrastRatio($blue)...
Extensible: So the developer can add more color spaces, more named color sets, filters, ...
todos:
Add unit tests
Add more named colors (web, ...)
add some helper functions like rgbtohex(r, g, b) to work as standalone functions
add palletes as a feature
add generators: random color generator, random pallete generator, pallet generator having some info, ...
Add filters and modifiers
- Brighten / darken (absolute and relative).
- Lighten / darken via HSL lightness.
- Saturate / desaturate, contrast, invert.
- Grayscale (multiple algorithms: average, luminosity, desaturate).
- Hue rotate, temperature/tint (warm/cool shifts).
- Channel-specific masks and adjustments (e.g., zero green, keep red only).
- Predefined filters: sepia, posterize, threshold, gamma.