Difference between revisions of "ColorComponent Script"

754 bytes added ,  07:26, 2 February 2014
m
]] where it shouldn't be
imported>CraftySentinel
m (Moved Information around and added alittle more)
imported>CraftySentinel
m (]] where it shouldn't be)
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Requires:''' [[:Category:SKSE|SKSE]] 1.06.03 or above
__NOTOC__ __NOEDITSECTION__
 
'''Extends:''' None
'''Extends:''' None


'''Flags:''' [[Flag Reference|Hidden]]
Script for the manipulation of Color Codes.




Script for the manipulation of [[ColorForm]] components.
== Definition ==
<source lang="papyrus">Scriptname ColorComponent Hidden</source>




== Global SKSE Member Functions==
== Global SKSE Member Functions==


{|class="wikitable" width =100%
:'''Int [[GetAlpha - ColorComponent|GetAlpha]](Int ''argb'')'''
!style="text-align:left;" width=25%|Function
:*Gets the Alpha component Value from the specified Alpha-Red-Green-Blue(ARGB) code.
!style="text-align:left;"|Description
 
|-
:'''Int [[GetRed - ColorComponent|GetRed]](Int ''argb'')'''
|[[GetAlpha - ColorComponent|Int GetAlpha(Int)]]
:*Gets the Red component value from the specified ARGB color code.
|Returns the Alpha component of the [[ColorForm]].
 
|-
:'''Int [[GetGreen - ColorComponent|GetGreen]](Int ''argb'')'''
:*Gets the Green component value of the specified ARGB color code.


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


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


|[[GetBlue - ColorComponent|Int GetBlue(Int)]]
:'''Float [[GetSaturation - ColorComponent|GetSaturation]](Int ''argb'')'''
|Returns the Blue component of the [[ColorForm]].
:*Gets the Saturation value of the specified ARGB color code.
|-


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


|[[GetSaturation - ColorComponent|Float GetSaturation(Int)]]
:'''Int [[SetAlpha - ColorComponent|SetAlpha]](Int ''argb'', Int ''a'')'''
|Returns the Saturation component of the [[ColorForm]].
:*Sets the Alpha component value of the specified ARGB color code to the specified amount.
|-


|[[GetValue - ColorComponent|Float GetValue(Int)]]
:'''Int [[SetRed - ColorComponent|SetRed]](Int ''argb'', Int ''r'')'''
|Returns the Luminosity component of the [[ColorForm]].
:*Sets the Red component value of the specified ARGB color code to the specified amount.
|-


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


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


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


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


|[[SetHue - ColorComponent|Int SetHue(Int, Float)]]
:'''Int [[SetValue - ColorComponent|SetValue]](Int ''argb'', Float ''v'')'''
|Sets the Hue component of the [[ColorForm]].
:*Sets the Value (Brightness) of the specified ARGB color code to the specified value.
|-


|[[SetSaturation - ColorComponent|Int SetSaturation(Int, Float)]]
|Sets the Saturation component of the [[ColorForm]].
|-


|[[SetValue - ColorComponent|Int SetValue(Int, Float)]]
== Notes ==
|Sets the Luminosity component of the [[ColorForm]].


|}
*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'''.


== Further Information ==
*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.


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 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.
*All ARGB color codes are Decimal conversions of Hex color codes. For example, a color code of 16777215 in Decimal is equivalent to #00FFFFFF in Hex (0 ,255, 255, 255 in ARGB values).