Godot Nature of Code  1.2.0
Nature of Code implemented in Godot Engine
Static Public Member Functions | List of all members
ColorExtensions Class Reference

Color extension methods More...

Static Public Member Functions

static Color WithAlpha (this Color color, byte alpha)
 Clone a color with an alpha value. More...
 

Detailed Description

Color extension methods

Definition at line 6 of file ColorExtensions.cs.

Member Function Documentation

◆ WithAlpha()

static Color ColorExtensions.WithAlpha ( this Color  color,
byte  alpha 
)
inlinestatic

Clone a color with an alpha value.

Parameters
colorCurrent color
alphaAlpha value (0-255)
Returns
Color with alpha

Definition at line 14 of file ColorExtensions.cs.

15  {
16  Color clone = color;
17  clone.a8 = alpha;
18  return clone;
19  }

The documentation for this class was generated from the following file: