setColor
fromColor
@DeprecatedpublicvoidfromColor
Deprecated.
Performs special-case processing on the supplied value. Recommend use argbToColor instead.
Converts the supplied binary value into color values, and sets the result to this object. Performs a clamp on the alpha channel. Performs a special-case on the alpha channel, where if it is 0, it is set to MAX instead.
- Parameters:
valueABGR
-
setABGR
publicvoidsetABGR
abgrToColor
public staticColorabgrToColor
colorToABGR
public staticintcolorToABGR
colorToABGR
public staticintcolorToABGR
multiplyABGR
public staticintmultiplyABGR
multiplyBGR
public staticintmultiplyBGR
blendBGR
public staticintblendBGR
blendABGR
public staticintblendABGR
tintABGR
public staticinttintABGR
lerpABGR
public staticintlerpABGR
getAlphaChannelFromABGR
public staticfloatgetAlphaChannelFromABGR
getBlueChannelFromABGR
public staticfloatgetBlueChannelFromABGR
getGreenChannelFromABGR
public staticfloatgetGreenChannelFromABGR
getRedChannelFromABGR
public staticfloatgetRedChannelFromABGR
setAlphaChannelToABGR
public staticintsetAlphaChannelToABGR
setBlueChannelToABGR
public staticintsetBlueChannelToABGR
setGreenChannelToABGR
public staticintsetGreenChannelToABGR
setRedChannelToABGR
public staticintsetRedChannelToABGR
random
public staticColorrandom()
Create a random color.
decode
Decode a number in a string and process it as a colour reference.
- Parameters:
nm
- The number string to decode- Returns:
- The color generated from the number read
add
publicvoidadd
Add another colour to this one
- Parameters:
c
- The colour to add
addToCopy
Add another colour to this one
- Parameters:
c
- The colour to add- Returns:
- The copy which has had the color added to it
brighter
publicColorbrighter()
Make a brighter instance of this colour
- Returns:
- The brighter version of this colour
brighter
publicColorbrighter
Make a brighter instance of this colour
- Parameters:
scale
- The scale up of RGB (i.e. if you supply 0.03 the colour will be brightened by 3%)- Returns:
- The brighter version of this colour
darker
publicColordarker()
Make a darker instance of this colour
- Returns:
- The darker version of this colour
darker
publicColordarker
Make a darker instance of this colour
- Parameters:
scale
- The scale down of RGB (i.e. if you supply 0.03 the colour will be darkened by 3%)- Returns:
- The darker version of this colour
equals
publicbooleanequals
set
set
publicColorset
set
publicColorset
getAlpha
publicintgetAlpha()
get the alpha byte component of this colour
- Returns:
- The alpha component (range 0-255)
getAlphaFloat
publicfloatgetAlphaFloat()
getRedFloat
publicfloatgetRedFloat()
getGreenFloat
publicfloatgetGreenFloat()
getBlueFloat
publicfloatgetBlueFloat()
getAlphaByte
publicintgetAlphaByte()
get the alpha byte component of this colour
- Returns:
- The alpha component (range 0-255)
getBlue
publicintgetBlue()
get the blue byte component of this colour
- Returns:
- The blue component (range 0-255)
getBlueByte
publicintgetBlueByte()
get the blue byte component of this colour
- Returns:
- The blue component (range 0-255)
getGreen
publicintgetGreen()
get the green byte component of this colour
- Returns:
- The green component (range 0-255)
getGreenByte
publicintgetGreenByte()
get the green byte component of this colour
- Returns:
- The green component (range 0-255)
getRed
publicintgetRed()
get the red byte component of this colour
- Returns:
- The red component (range 0-255)
getRedByte
publicintgetRedByte()
get the red byte component of this colour
- Returns:
- The red component (range 0-255)
hashCode
publicinthashCode()
multiply
Multiply this color by another
- Parameters:
c
- the other color- Returns:
- product of the two colors
scale
publicColorscale
Scale the components of the colour by the given value
- Parameters:
value
- The value to scale by
scaleCopy
publicColorscaleCopy
Scale the components of the colour by the given value
- Parameters:
value
- The value to scale by- Returns:
- The copy which has been scaled
toString
publicStringtoString()
interp
changeHSBValue
publicvoidchangeHSBValue
HSBtoRGB
public staticColorHSBtoRGB
HSBtoRGB
public staticColorHSBtoRGB