Calling "Generate Alpha From Grayscale" from scripting??

Hi, I am attempting to create 2D procedurally generated clouds and I have everything working except for one slight problem.. I need to procedurally imported script to have the property "Generate Alpha from Grayscale" enabled and I haven't been able to figure out how to do this via scripting.. Any help on this would be greatly Appreciated! Thanks!

Use an editor script that iterates over the files that you want to modify, checking grayscaleToAlpha on each. Of course, you can’t do this at runtime- because by that point the asset has already been imported.

Try to look here, here or the OP’s question on forum.

I suppose it’s not to hard to generate it yourself though. Once you have the texture, go through each pixel and generate alpha with an average of the 3 values, or like jessy suggest it, a dot product.