TractorCow\Colorpicker\Color
Color field-type
- Author: bummzack
Synopsis
class Color
extends DBVarchar
{
- // members
- private static array $casting = ;
- // methods
- public static array RGB_TO_HSV()
- public static array HSV_TO_RGB()
- public static array HEX_TO_RGB()
- public static string RGB_TO_HEX()
- public static number RGB_TO_LUMINANCE()
- public void __construct()
- public void scaffoldFormField()
- public int Red()
- public int Green()
- public int Blue()
- public string CSSColor()
- public float Luminance()
- public Color AlteredColorHSV()
- public Color Blend()
- private static float|int clamp()
- public string ColorCMS()
Hierarchy
Extends
- SilverStripe\ORM\FieldType\DBVarchar
Members
private
- $casting
Methods
private
- clamp() — Clamp value to min/max
public
- __construct()
- AlteredColorHSV() — Change the color by the given HSV values and return a new color
- Blend() — Blend the color with a background color, with the given opacity level
- Blue() — Get the blue component of this color
- CSSColor() — Get the color as CSS3 color definition with optional alpha value.
- ColorCMS() — HTML representation of color for usage in CMS
- Green() — Get the green component of this color
- HEX_TO_RGB() — Convert a hex string to separate R,G,B values
- HSV_TO_RGB() — Helper function to convert HSV to RGB
- Luminance() — Return the luminance of the color
- RGB_TO_HEX() — Convert R,G,B to hex
- RGB_TO_HSV() — Helper function to convert RGB to HSV
- RGB_TO_LUMINANCE() — Calculate luminance (Photometric/digital ITU-R)
- Red() — Get the red component of this color
- scaffoldFormField()