Link to home
Start Free TrialLog in
Avatar of MadDog986
MadDog986

asked on

change hex color to ligher or darker

I need some kind of function that can i change a hex color to lighter or darker.

Example:
------------------------

strColor = LightenColor("#000000", 50)
strColor2 = LightenColor("#FFFFFF", 25)

Function LightenColor(strHex, strValue)
      'strHex holds the color
      'strValue holds how much to change
      'Code to lighten color
End Function

Function DarkenColor(strHex, strValue)
      'strHex holds the color
      'strValue holds how much to change
      'Code to lighten color
End Function
------------------------

Thanks in advanced.
ASKER CERTIFIED SOLUTION
Avatar of dfu23
dfu23

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MadDog986
MadDog986

ASKER

thanks, had to edit it a bit but that works.