mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-07-28 11:07:48 +00:00
22 lines
559 B
C#
Executable File
22 lines
559 B
C#
Executable File
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Drawing;
|
|
|
|
namespace MtApi
|
|
{
|
|
class MtApiColorConverter
|
|
{
|
|
public static Color ConvertFromMtColor(int color)
|
|
{
|
|
return Color.FromArgb((byte)(color), (byte)(color >> 8), (byte)(color >> 16));
|
|
}
|
|
|
|
public static int ConvertToMtColor(Color color)
|
|
{
|
|
return color == Color.Empty ? 0xffffff : (Color.FromArgb(color.B, color.G, color.R).ToArgb() & 0xffffff);
|
|
}
|
|
}
|
|
}
|