ColorHelper.cs 452 B

123456789101112131415161718
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Drawing;
  4. using System.Linq;
  5. using System.Runtime.CompilerServices;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace Veldrid.Common.Tools
  9. {
  10. internal static class ColorHelper
  11. {
  12. public static RgbaFloat ColorConverToRGBA(this Color color)
  13. {
  14. return new RgbaFloat(color.R / 255f, color.G / 255f, color.B / 255f, color.A / 255f);
  15. }
  16. }
  17. }