Here is your problem:
new Color(0f, 0f, 0f, **255f**);
Color constructor parameter takes values from
1f but you are passing
255f range value to it.
That should be:
colorToFadeTo = new Color(0f, 0f, 0f, 1f);
If you want to use the
255 range then you must divide it by
colorToFadeTo = new Color(0f, 0f, 0f, 255f/255f);
Also, there is
Color32 which can take values between
255. You can use that then covert it back to color.
Color32 color32 = new Color32(0f, 0f, 0f, 255f)); Color color = color32;