Skip to content
Nicholas Jordon edited this page Aug 31, 2016 · 11 revisions

Welcome To PHP Color

Excuse our dust… This wiki is still being developed.


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.

Features

  • 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.

Table Of Contents


Next Page - Getting Started