Color Object Extension
©
A T O M G A S, 2001 Luzifer Altrenberg


http://atomgas.de
luzifer@atomgas.de


[ download color.as ]

 
new function:
public functions:
 
mySetDefault()
  return to the dafault color
( the color of the movieClip in the library )
mySetHSB(h,s,b)
  set the hsb value of the color
this function can also be called like this
mySetHSB(hsbObj)
myGetHSB()
  returns a hsb object
mySetRGB(r,g,b)
  set rgb by values from 0-255
or mySetRGB(rgbObj)
this function can also be called like this
mySetRGB(rgbObj)
myGetRGB()
  returns a rgb object with values from 0-255
mySetHex(hex)
  set the hex value
myGetHex()
  returns a zerofilled UPPERCASE formated Hex value
myTint(color,value)
  tint the object between the current color and color by value
color can be a rgbObject or a hex value
myTint2(color1,color2,value)
  tint the object between the color1 and color2 by value
color1 and color2 can be rgbObjects or hex values
myLighten(value)
  lights up the color by the given value [0..100]
( not the same like tint to white )
myDarken(value)
  darks the color by the given value [0..100]
myInvert(value)
  inverts the color by value given by value [0..100]
myChannelInvert(rValue,gValue,bValue)
  inverts the channels by the given values [0..100]
showFunctions()
  show all added functions

privat functions:
 
_HEXtoRGB(hex)
  returns a rgb Object
_HSBtoRGB(hsbObj)
  returns a rgb Object
_RGBtoHEX(rgbObject)
  returns a zerofilled UPPERCASE hex value
_RGBtoHSB(rgbObj)
  return a hsb Object
_mix(a,b,value)
  mixes a with value of b