Still wrong number buddy - one point of clarification ... the numbers passed may be specifed in HEX ie,

$color = FadeToBlack(&00DDEE, &DD)

but they are decimal inside the UDF ... so wouldn't make any assumptions about that. Just that they are easier to pass and visualize using hex. With Jooels ...

$c = fadeToBlack(&00DDFF,&DD)

?"value=" DecToHex($c)

value is: 8441 (dec) 2121 (hex) - should be 56797 (dec) or DDDD (hex)