HSVColor

Chameleon\Colors\HSVColor

Color Class for HSV colors

Represents a color based on the HSV (hue, saturation, value) system

  • Class name: HSVColor
  • Namespace: Chameleon\Colors
  • Fully qualified class name: Chameleon\Colors\HSVColor
  • Extends: Chameleon\Colors\Color

Methods

__construct()

void HSVColor::__construct(integer $hue, float $saturation, float $value)

Class constructor

Arguments

  • $hue integer - <p>Hue value [0, 359]</p>
  • $saturation float - <p>Saturation [0, 1]</p>
  • $value float - <p>Value [0, 1]</p>

fromRGBA()

void IColor::fromRGBA(RGBAColor $color)

Construct from an RGBAColor


__toString()

string IColor::__toString()

Return a string representation of the color.


getHue()

integer HSVColor::getHue()

Get hue value

Returns the hue value of this color

Arguments

None.


setHue()

HSVColor HSVColor::setHue(integer $hue)

Set hue value

Sets the hue value of this color

Arguments

  • $hue integer - <p>The hue value [0, 359]</p>

getSaturation()

float HSVColor::getSaturation()

Get saturation value

Returns the saturation value of this color

Arguments

None.


setSaturation()

HSVColor HSVColor::setSaturation(float|integer $saturation)

Set saturation value

Sets the saturation value of this color

Arguments

  • $saturation float|integer - <p>The saturation value [0, 1]</p>

getValue()

float HSVColor::getValue()

Get value

Returns the value of this color

Arguments

None.


setValue()

HSVColor HSVColor::setValue(float|integer $value)

Set value

Sets the value of this color

Arguments

  • $value float|integer - <p>The value [0, 1]</p>

getRGBA()

RGBAColor IColor::getRGBA()

Get the RGBA representation of the color


lighten()

IColor IColor::lighten(float $percentage)

Make the color lighter


darken()

IColor IColor::darken(float $percentage)

Make the color darker


getInt()

integer IColor::getInt()

Return the integer value of this color.


convertTo()

IColor Color::convertTo(string $class)

Convert a color to another color system.

  • Defined by Chameleon\Colors\Color

    Arguments

  • $class string - <p>The new color's FQCN, e.g. HSLColor::class</p>


transparent()

mixed Color::transparent()

transparent


aliceBlue()

mixed Color::aliceBlue()

aliceBlue


antiqueWhite()

mixed Color::antiqueWhite()

antiqueWhite


aqua()

mixed Color::aqua()

aqua


aquamarine()

mixed Color::aquamarine()

aquamarine


azure()

mixed Color::azure()

azure


beige()

mixed Color::beige()

beige


bisque()

mixed Color::bisque()

bisque


black()

mixed Color::black()

black


blanchedAlmond()

mixed Color::blanchedAlmond()

blanchedAlmond


blue()

mixed Color::blue()

blue


blueViolet()

mixed Color::blueViolet()

blueViolet


brown()

mixed Color::brown()

brown


burlyWood()

mixed Color::burlyWood()

burlyWood


cadetBlue()

mixed Color::cadetBlue()

cadetBlue


chartreuse()

mixed Color::chartreuse()

chartreuse


chocolate()

mixed Color::chocolate()

chocolate


coral()

mixed Color::coral()

coral


cornflowerBlue()

mixed Color::cornflowerBlue()

cornflowerBlue


cornsilk()

mixed Color::cornsilk()

cornsilk


crimson()

mixed Color::crimson()

crimson


cyan()

mixed Color::cyan()

cyan


darkBlue()

mixed Color::darkBlue()

darkBlue


darkCyan()

mixed Color::darkCyan()

darkCyan


darkGoldenRod()

mixed Color::darkGoldenRod()

darkGoldenRod


darkGray()

mixed Color::darkGray()

darkGray


darkGrey()

mixed Color::darkGrey()

darkGrey


darkGreen()

mixed Color::darkGreen()

darkGreen


darkKhaki()

mixed Color::darkKhaki()

darkKhaki


darkMagenta()

mixed Color::darkMagenta()

darkMagenta


darkOliveGreen()

mixed Color::darkOliveGreen()

darkOliveGreen


darkOrange()

mixed Color::darkOrange()

darkOrange


darkOrchid()

mixed Color::darkOrchid()

darkOrchid


darkRed()

mixed Color::darkRed()

darkRed


darkSalmon()

mixed Color::darkSalmon()

darkSalmon


darkSeaGreen()

mixed Color::darkSeaGreen()

darkSeaGreen


darkSlateBlue()

mixed Color::darkSlateBlue()

darkSlateBlue


darkSlateGray()

mixed Color::darkSlateGray()

darkSlateGray


darkSlateGrey()

mixed Color::darkSlateGrey()

darkSlateGrey


darkTurquoise()

mixed Color::darkTurquoise()

darkTurquoise


darkViolet()

mixed Color::darkViolet()

darkViolet


deepPink()

mixed Color::deepPink()

deepPink


deepSkyBlue()

mixed Color::deepSkyBlue()

deepSkyBlue


dimGray()

mixed Color::dimGray()

dimGray


dimGrey()

mixed Color::dimGrey()

dimGrey


dodgerBlue()

mixed Color::dodgerBlue()

dodgerBlue


fireBrick()

mixed Color::fireBrick()

fireBrick


floralWhite()

mixed Color::floralWhite()

floralWhite


forestGreen()

mixed Color::forestGreen()

forestGreen


fuchsia()

mixed Color::fuchsia()

fuchsia


gainsboro()

mixed Color::gainsboro()

gainsboro


ghostWhite()

mixed Color::ghostWhite()

ghostWhite


gold()

mixed Color::gold()

gold


goldenRod()

mixed Color::goldenRod()

goldenRod


gray()

mixed Color::gray()

gray


grey()

mixed Color::grey()

grey


green()

mixed Color::green()

green


greenYellow()

mixed Color::greenYellow()

greenYellow


honeyDew()

mixed Color::honeyDew()

honeyDew


hotPink()

mixed Color::hotPink()

hotPink


indianRed()

mixed Color::indianRed()

indianRed


indigo()

mixed Color::indigo()

indigo


ivory()

mixed Color::ivory()

ivory


khaki()

mixed Color::khaki()

khaki


lavender()

mixed Color::lavender()

lavender


lavenderBlush()

mixed Color::lavenderBlush()

lavenderBlush


lawnGreen()

mixed Color::lawnGreen()

lawnGreen


lemonChiffon()

mixed Color::lemonChiffon()

lemonChiffon


lightBlue()

mixed Color::lightBlue()

lightBlue


lightCoral()

mixed Color::lightCoral()

lightCoral


lightCyan()

mixed Color::lightCyan()

lightCyan


lightGoldenRodYellow()

mixed Color::lightGoldenRodYellow()

lightGoldenRodYellow


lightGray()

mixed Color::lightGray()

lightGray


lightGrey()

mixed Color::lightGrey()

lightGrey


lightGreen()

mixed Color::lightGreen()

lightGreen


lightPink()

mixed Color::lightPink()

lightPink


lightSalmon()

mixed Color::lightSalmon()

lightSalmon


lightSeaGreen()

mixed Color::lightSeaGreen()

lightSeaGreen


lightSkyBlue()

mixed Color::lightSkyBlue()

lightSkyBlue


lightSlateGray()

mixed Color::lightSlateGray()

lightSlateGray


lightSlateGrey()

mixed Color::lightSlateGrey()

lightSlateGrey


lightSteelBlue()

mixed Color::lightSteelBlue()

lightSteelBlue


lightYellow()

mixed Color::lightYellow()

lightYellow


lime()

mixed Color::lime()

lime


limeGreen()

mixed Color::limeGreen()

limeGreen


linen()

mixed Color::linen()

linen


magenta()

mixed Color::magenta()

magenta


maroon()

mixed Color::maroon()

maroon


mediumAquaMarine()

mixed Color::mediumAquaMarine()

mediumAquaMarine


mediumBlue()

mixed Color::mediumBlue()

mediumBlue


mediumOrchid()

mixed Color::mediumOrchid()

mediumOrchid


mediumPurple()

mixed Color::mediumPurple()

mediumPurple


mediumSeaGreen()

mixed Color::mediumSeaGreen()

mediumSeaGreen


mediumSlateBlue()

mixed Color::mediumSlateBlue()

mediumSlateBlue


mediumSpringGreen()

mixed Color::mediumSpringGreen()

mediumSpringGreen


mediumTurquoise()

mixed Color::mediumTurquoise()

mediumTurquoise


mediumVioletRed()

mixed Color::mediumVioletRed()

mediumVioletRed


midnightBlue()

mixed Color::midnightBlue()

midnightBlue


mintCream()

mixed Color::mintCream()

mintCream


mistyRose()

mixed Color::mistyRose()

mistyRose


moccasin()

mixed Color::moccasin()

moccasin


mixed Color::navajoWhite()

navajoWhite


mixed Color::navy()

navy


oldLace()

mixed Color::oldLace()

oldLace


olive()

mixed Color::olive()

olive


oliveDrab()

mixed Color::oliveDrab()

oliveDrab


orange()

mixed Color::orange()

orange


orangeRed()

mixed Color::orangeRed()

orangeRed


orchid()

mixed Color::orchid()

orchid


paleGoldenRod()

mixed Color::paleGoldenRod()

paleGoldenRod


paleGreen()

mixed Color::paleGreen()

paleGreen


paleTurquoise()

mixed Color::paleTurquoise()

paleTurquoise


paleVioletRed()

mixed Color::paleVioletRed()

paleVioletRed


papayaWhip()

mixed Color::papayaWhip()

papayaWhip


peachPuff()

mixed Color::peachPuff()

peachPuff


peru()

mixed Color::peru()

peru


pink()

mixed Color::pink()

pink


plum()

mixed Color::plum()

plum


powderBlue()

mixed Color::powderBlue()

powderBlue


purple()

mixed Color::purple()

purple


rebeccaPurple()

mixed Color::rebeccaPurple()

rebeccaPurple


red()

mixed Color::red()

red


rosyBrown()

mixed Color::rosyBrown()

rosyBrown


royalBlue()

mixed Color::royalBlue()

royalBlue


saddleBrown()

mixed Color::saddleBrown()

saddleBrown


salmon()

mixed Color::salmon()

salmon


sandyBrown()

mixed Color::sandyBrown()

sandyBrown


seaGreen()

mixed Color::seaGreen()

seaGreen


seaShell()

mixed Color::seaShell()

seaShell


sienna()

mixed Color::sienna()

sienna


silver()

mixed Color::silver()

silver


skyBlue()

mixed Color::skyBlue()

skyBlue


slateBlue()

mixed Color::slateBlue()

slateBlue


slateGray()

mixed Color::slateGray()

slateGray


slateGrey()

mixed Color::slateGrey()

slateGrey


snow()

mixed Color::snow()

snow


springGreen()

mixed Color::springGreen()

springGreen


steelBlue()

mixed Color::steelBlue()

steelBlue


tan()

mixed Color::tan()

tan


teal()

mixed Color::teal()

teal


thistle()

mixed Color::thistle()

thistle


tomato()

mixed Color::tomato()

tomato


turquoise()

mixed Color::turquoise()

turquoise


violet()

mixed Color::violet()

violet


wheat()

mixed Color::wheat()

wheat


white()

mixed Color::white()

white


whiteSmoke()

mixed Color::whiteSmoke()

whiteSmoke


yellow()

mixed Color::yellow()

yellow


yellowGreen()

mixed Color::yellowGreen()

yellowGreen