Difference between revisions of "ColorComponent Script"

701 bytes added ,  23:59, 27 August 2013
m
Added addition information.
imported>CraftySentinel
m (→‎Notes: changed header name to maintain some kind of uniformity)
imported>CraftySentinel
m (Added addition information.)
Line 6: Line 6:




Script for the manipulation of [[ColorForm]] components.
Script for the manipulation of Color Codes.




Line 15: Line 15:
!style="text-align:left;"|Description
!style="text-align:left;"|Description
|-
|-
|[[GetAlpha - ColorComponent|Int GetAlpha(Int)]]
|[[GetAlpha - ColorComponent|Int '''GetAlpha'''(''Int'')]]
|Returns the Alpha component of the [[ColorForm]].
||Gets the Alpha component Value from the specified Alpha-Red-Green-Blue(ARGB) code.
|-
|-


|[[GetRed - ColorComponent|Int GetRed(Int)]]
|[[GetRed - ColorComponent|Int '''GetRed'''(''Int)'']]
|Returns the Red component of the [[ColorForm]].
|Gets the Red component value from the specified ARGB color code.
|-
|-


|[[GetGreen - ColorComponent|Int GetGreen(Int)]]
|[[GetGreen - ColorComponent|Int '''GetGreen'''(''Int'')]]
|Returns the Green component of the [[ColorForm]].
|Gets the Green component value of the specified ARGB color code.
|-
|-


|[[GetBlue - ColorComponent|Int GetBlue(Int)]]
|[[GetBlue - ColorComponent|Int '''GetBlue'''(''Int'')]]
|Returns the Blue component of the [[ColorForm]].
|Gets the Blue component value of the specified ARGB color code.
|-
|-


|[[GetHue - ColorComponent|Float GetHue(Int)]]
|[[GetHue - ColorComponent|Float '''GetHue'''(''Int'')]]
|Returns the Hue component of the [[ColorForm]].
||Gets the Hue value of the specified ARGB, ranging from 0.0 to 360.0.
|-
|-


|[[GetSaturation - ColorComponent|Float GetSaturation(Int)]]
|[[GetSaturation - ColorComponent|Float '''GetSaturation'''(''Int'')]]
|Returns the Saturation component of the [[ColorForm]].
|Gets the Saturation value of the ARGB color code.
|-
|-


|[[GetValue - ColorComponent|Float GetValue(Int)]]
|[[GetValue - ColorComponent|Float '''GetValue'''(''Int'')]]
|Returns the Luminosity component of the [[ColorForm]].
|Gets the Value of the ARGB color code, Value is also known as Brightness or Luminosity.
|-
|-


|[[SetAlpha - ColorComponent|Int SetAlpha(Int, Int)]]
|[[SetAlpha - ColorComponent|Int '''SetAlpha'''(''Int, Int'')]]
|Sets the Alpha component of the [[ColorForm]].
|Sets the Alpha component value of the ARGB color code to the specified amount.
|-
|-


|[[SetRed - ColorComponent|Int SetRed(Int, Int)]]
|[[SetRed - ColorComponent|Int '''SetRed'''(''Int, Int'')]]
|Sets the Red component of the [[ColorForm]].
|Sets the Red component value of the ARGB color code to the specified amount.
|-
|-


|[[SetGreen - ColorComponent|Int SetGreen(Int, Int)]]
|[[SetGreen - ColorComponent|Int '''SetGreen'''(''Int, Int'')]]
|Sets the Green component of the [[ColorForm]].
|Sets the Green component value of the ARGB color code to the specified amount.
|-
|-


|[[SetBlue - ColorComponent|Int SetBlue(Int, Int)]]
|[[SetBlue - ColorComponent|Int '''SetBlue'''(''Int, Int'')]]
|Sets the Blue component of the [[ColorForm]].
|Sets the Blue component value of the ARGB color code to the specified amount.
|-
|-


|[[SetHue - ColorComponent|Int SetHue(Int, Float)]]
|[[SetHue - ColorComponent|Int '''SetHue'''(''Int, Float'')]]
|Sets the Hue component of the [[ColorForm]].
|Sets the Hue value of the ARGB color code to the specified value.
|-
|-


|[[SetSaturation - ColorComponent|Int SetSaturation(Int, Float)]]
|[[SetSaturation - ColorComponent|Int '''SetSaturation'''(''Int, Float'')]]
|Sets the Saturation component of the [[ColorForm]].
|Sets the Saturation value of the ARGB color code to the specified value.
|-
|-


|[[SetValue - ColorComponent|Int SetValue(Int, Float)]]
|[[SetValue - ColorComponent|Int '''SetValue'''(''Int, Float'')]]
|Sets the Luminosity component of the [[ColorForm]].
|Sets the Value (Brightness) of the ARGB color code to the specified value.


|}
|}
Line 74: Line 74:
== Notes ==
== 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 also GetLuminosity and SetLuminosity were changed to GetValue, SetValue.  
*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)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.
*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 #FFFFFF in Hex (0 ,255, 255, 255 in ARGB values).
 


==See Also ==
==See Also ==