Create a gist now

Instantly share code, notes, and snippets.

Silly workaround for easy alpha scaling on the Unity Color type.
public static Color A (this Color color, float alphaScale)
{
return new Color (color.r, color.g, color.b, color.a * alphaScale);
}
// Gizmos.color = Color.red.A (0.3f);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment