Skip to content

Instantly share code, notes, and snippets.

@AngryAnt
Created October 21, 2013 07:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AngryAnt/7080116 to your computer and use it in GitHub Desktop.
Save AngryAnt/7080116 to your computer and use it in GitHub Desktop.
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