mirror of
https://github.com/DCFApixels/Unity-DebugX.git
synced 2025-09-17 17:34:35 +08:00
19 lines
424 B
C#
19 lines
424 B
C#
using UnityEngine;
|
|
|
|
namespace DCFApixels.DebugXCore.Internal
|
|
{
|
|
internal static class ColorExtensions
|
|
{
|
|
public static Color SetAlpha(this Color self, float v)
|
|
{
|
|
self.a *= v;
|
|
return self;
|
|
}
|
|
public static Color ToColor(ref this (Color color, float alpha) self)
|
|
{
|
|
self.color.a *= self.alpha;
|
|
return self.color;
|
|
}
|
|
}
|
|
}
|