\Color
Color
Synopsis
class Color
{
- // methods
- public void __construct()
- public static void fromHexString()
- public static void fromRGBString()
- public void toHexString()
- private void decToHex()
- public static void fromHSL()
- public static void fromHSV()
- public void darken()
- public void lighten()
- public void saturate()
- public void contrast()
- public void changeHSL()
- public void apply()
- public void toHSL()
- public void toHSV()
- public void luma()
- public void isDark()
Tasks
Line | Task |
---|---|
494 | Read a paper on this :P |
Members
private
- $hsxCache
public
- $b
- $g
- $r
Methods
private
public
- __construct() — Constructor
- apply() — Apply callbacks on HSV or HSL value of the color
- changeHSL() — Change HSL values by given deltas
- contrast() — Return a contrasting color
- darken() — Darken the current color by a fraction
- fromHSL() — Construct a Color object from H, S, L values
- fromHSV() — Construct a Color object from HSV values
- fromHexString() — Construct a Color from hex string
- fromRGBString() — Construct Color object from an rgb string
- isDark() — Is the color dark?
- lighten() — Lighten the current color by a fraction
- luma() — Get the luma of the color
- saturate() — Saturate the current color by a fraction
- toHSL() — Convert the current color to HSL values
- toHSV() — Convert the current color to HSV values
- toHexString() — Convert color object to hex string