-
Notifications
You must be signed in to change notification settings - Fork 8
Home
Nicholas Jordon edited this page Aug 30, 2016
·
11 revisions
This is a PHP 7 (and PHP 5!) library for working with RGB, HSL, HSB/HSV, Hexadecimal, and CMYK colors. Create schemes, modify specific color properties, easily convert between color spaces, and make color suggestions quickly and easily with this stand-alone library.
- Convert any color between the RGB, HSL, HSB/HSV, Hexadecimal, and CMYK color spectrums.
- Dynamically generate 10 different color scheme algorithms for any color. (That's over 165,000,000 possible schemes)
- Check whether a color appears visually dark or light. (uses YIQ weights for better accuracy)
- Easily modify a color's hue, saturation, light, red, green, blue, and alpha (transparency) values.
- Generate CSS values on the fly
- Find the contrast between 2 colors.
- Dynamically generate random colors, including for specific color ranges.
- All errors are recoverable, and errors can be triggered as exceptions (default), using
trigger_error()
, or can be turned off for all instances.
- Getting Started – (Installation & Setup)
- Error Handling
- Optimization & Caching
- Importing A Color
- The Alpha Channel
- Generating A Random Color
- Getting A Color's Attributes
- Determining If A Color Is Light Or Dark
- Convertions (CSS, Websafe)
- Modify A Color
- Creating Schemes (Mathematical & YIQ)
- Gradients & Color Ranges
- Misc. Features (Invert, Blend, Regulate Values, YIQ Score)
- Serialization
Copyright © 2016 Nicholas Jordon
This documentation is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.