Color (2024)

  • setColor

    publicvoidsetColor(ColorA, ColorB, floatdelta)

  • fromColor

    @DeprecatedpublicvoidfromColor(intvalueABGR)

    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(intvalueABGR)

  • abgrToColor

    public staticColorabgrToColor(intvalueABGR, Colorout_result)

  • colorToABGR

    public staticintcolorToABGR(Colorval)

  • colorToABGR

    public staticintcolorToABGR(floatr, floatg, floatb, floata)

  • multiplyABGR

    public staticintmultiplyABGR(intvalueABGR, intmultiplierABGR)

  • multiplyBGR

    public staticintmultiplyBGR(intvalueABGR, intmultiplierABGR)

  • blendBGR

    public staticintblendBGR(intvalueABGR, inttargetABGR)

  • blendABGR

    public staticintblendABGR(intvalueABGR, inttargetABGR)

  • tintABGR

    public staticinttintABGR(inttargetABGR, inttintABGR)

  • lerpABGR

    public staticintlerpABGR(intcolA, intcolB, floatalpha)

  • getAlphaChannelFromABGR

    public staticfloatgetAlphaChannelFromABGR(intvalueABGR)

  • getBlueChannelFromABGR

    public staticfloatgetBlueChannelFromABGR(intvalueABGR)

  • getGreenChannelFromABGR

    public staticfloatgetGreenChannelFromABGR(intvalueABGR)

  • getRedChannelFromABGR

    public staticfloatgetRedChannelFromABGR(intvalueABGR)

  • setAlphaChannelToABGR

    public staticintsetAlphaChannelToABGR(intvalueABGR, floata)

  • setBlueChannelToABGR

    public staticintsetBlueChannelToABGR(intvalueABGR, floatb)

  • setGreenChannelToABGR

    public staticintsetGreenChannelToABGR(intvalueABGR, floatg)

  • setRedChannelToABGR

    public staticintsetRedChannelToABGR(intvalueABGR, floatr)

  • random

    public staticColorrandom()

    Create a random color.

  • decode

    public staticColordecode(Stringnm)

    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(Colorc)

    Add another colour to this one

    Parameters:
    c - The colour to add
  • addToCopy

    publicColoraddToCopy(Colorc)

    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(floatscale)

    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(floatscale)

    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(Objectother)

    Overrides:
    equalsin classObject
    See Also:
  • set

    publicColorset(Colorother)

  • set

    publicColorset(floatr, floatg, floatb)

  • set

    publicColorset(floatr, floatg, floatb, floata)

  • 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()

    Overrides:
    hashCodein classObject
    See Also:
  • multiply

    publicColormultiply(Colorc)

    Multiply this color by another

    Parameters:
    c - the other color
    Returns:
    product of the two colors
  • scale

    publicColorscale(floatvalue)

    Scale the components of the colour by the given value

    Parameters:
    value - The value to scale by
  • scaleCopy

    publicColorscaleCopy(floatvalue)

    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()

    Overrides:
    toStringin classObject
    See Also:
  • interp

    publicvoidinterp(Colorto, floatdelta, Colordest)

  • changeHSBValue

    publicvoidchangeHSBValue(floathFactor, floatsFactor, floatbFactor)

  • HSBtoRGB

    public staticColorHSBtoRGB(floathue, floatsaturation, floatbrightness, Colorresult)

  • HSBtoRGB

    public staticColorHSBtoRGB(floathue, floatsaturation, floatbrightness)

  • Color (2024)
    Top Articles
    Latest Posts
    Article information

    Author: Gov. Deandrea McKenzie

    Last Updated:

    Views: 5515

    Rating: 4.6 / 5 (46 voted)

    Reviews: 93% of readers found this page helpful

    Author information

    Name: Gov. Deandrea McKenzie

    Birthday: 2001-01-17

    Address: Suite 769 2454 Marsha Coves, Debbieton, MS 95002

    Phone: +813077629322

    Job: Real-Estate Executive

    Hobby: Archery, Metal detecting, Kitesurfing, Genealogy, Kitesurfing, Calligraphy, Roller skating

    Introduction: My name is Gov. Deandrea McKenzie, I am a spotless, clean, glamorous, sparkling, adventurous, nice, brainy person who loves writing and wants to share my knowledge and understanding with you.