Code/SboxSuperuser/Engine/Prefixes/EffectColors.cs

A small static helper that converts between the package's own EffectColor struct and Sandbox.Color, in both directions.

using Sandbox;
using SboxSuperuser.Core.Effects;

namespace SboxSuperuser.Engine.Prefixes;

/// <summary>Converts between effect colors and s&amp;box colors.</summary>
internal static class EffectColors
{
	internal static Color ToColor( EffectColor color ) => new( color.R, color.G, color.B, color.A );

	internal static EffectColor FromColor( Color color ) => new( color.r, color.g, color.b, color.a );
}