-
Notifications
You must be signed in to change notification settings - Fork 8
Home
Nicholas Jordon edited this page Oct 21, 2016
·
11 revisions
This is a stand-alone 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, create gradients, and make color suggestions quickly and easily.
- Convert any color between the RGB, HSL, HSB/HSV, Hexadecimal, and CMYK color spectrums.
- Dynamically generate 10 different color scheme algorithms for any color, 8 of which have optional YIQ weights. (That's 301,989,888 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.
- 01 – Getting Started – (Installation & Setup)
- 02 – Error Handling
- 03 – Optimization & Caching
- 04 – Importing A Color
- 05 – The Alpha Channel
- 06 – Generating A Random Color
- 07 – Getting A Color's Attributes
- 08 – Determining If A Color Is Light Or Dark
- 09 – Convertions (CSS, Websafe)
- 10 – Modify A Color
- 11 – Creating Schemes (Mathematical & YIQ)
- 12 – Gradients & Color Ranges
- 13 – Misc. Features (Invert, Blend, Regulate Values, YIQ Score)
- 14 – Serialization
Copyright © 2016 Nicholas Jordon
This documentation is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.