ColorComponent Script

Revision as of 01:45, 28 August 2013 by imported>CraftySentinel (→‎Notes: Fixed Hex Value)

Requires: SKSE 1.06.03 or above

Extends: None

Flags: Hidden


Script for the manipulation of Color Codes.


Global SKSE Member Functions

Function Description
Int GetAlpha(Int) Gets the Alpha component Value from the specified Alpha-Red-Green-Blue(ARGB) code.
Int GetRed(Int) Gets the Red component value from the specified ARGB color code.
Int GetGreen(Int) Gets the Green component value of the specified ARGB color code.
Int GetBlue(Int) Gets the Blue component value of the specified ARGB color code.
Float GetHue(Int) Gets the Hue value of the specified ARGB, ranging from 0.0 to 360.0.
Float GetSaturation(Int) Gets the Saturation value of the ARGB color code.
Float GetValue(Int) Gets the Value of the ARGB color code, Value is also known as Brightness or Luminosity.
Int SetAlpha(Int, Int) Sets the Alpha component value of the ARGB color code to the specified amount.
Int SetRed(Int, Int) Sets the Red component value of the ARGB color code to the specified amount.
Int SetGreen(Int, Int) Sets the Green component value of the ARGB color code to the specified amount.
Int SetBlue(Int, Int) Sets the Blue component value of the ARGB color code to the specified amount.
Int SetHue(Int, Float) Sets the Hue value of the ARGB color code to the specified value.
Int SetSaturation(Int, Float) Sets the Saturation value of the ARGB color code to the specified value.
Int SetValue(Int, Float) Sets the Value (Brightness) of the ARGB color code to the specified value.

Notes

  • The bulk of the functions were added by SKSE in 1.06.00, however GetAlpha and SetAlpha were added in 1.06.02, while GetValue and SetValue were added in 1.06.03 replacing GetLuminosity and SetLuminosity.
  • The get functions (Excluding GetAlpha since ColorForms do not contain a alpha channel) within this script are used by functions of the same name contained within ColorForm Script, to access the individual color components of a ColorForm's ARGB.
  • All ARGB color codes are Decimal conversions of Hex color codes. For example, a color code of 167777215 in Decimal is equivalent to #00FFFFFF in Hex (0 ,255, 255, 255 in ARGB values).

See Also