Color¶
-
php\swing\Color
Properties
Methods
__construct
($rgb, $hasAlpha = false)¶
Parameters:
- $rgb – int
- $hasAlpha – bool
darker
()¶Creates a new Color that is a darker version of this
Returns: php\swing\Color
brighter
()¶Creates a new Color that is a brighter version of this
Returns: php\swing\Color
- static
rgb
($r, $g, $b, $alpha = 255)
Parameters:
- $r – int - - 0 .. 255
- $g – int - - 0 .. 255
- $b – int - - 0 .. 255
- $alpha – int - - 0 .. 255
Returns:
- static
floatRgb
($r, $g, $b, $alpha = 1.0)¶
Parameters:
- $r – double - - between 0 and 1
- $g – double - - between 0 and 1
- $b – double - - between 0 and 1
- $alpha – double - - between 0 and 1
Returns:
- static
decode
($nm)¶Decode color from a hex string (#RGB, 0xRGB, etc...)
Parameters:
- $nm –
Returns: