mirror of
https://github.com/kwsch/NHSE.git
synced 2026-07-15 07:41:37 -05:00
Move sprite resources to subfolder for organization Add FieldItem class (replaces MapItem), might work in a field item editor (similar to building editor)
16 lines
482 B
C#
16 lines
482 B
C#
using System.Drawing;
|
|
|
|
namespace NHSE.Sprites
|
|
{
|
|
public static class ColorUtil
|
|
{
|
|
public static Color Blend(Color color, Color backColor, double amount)
|
|
{
|
|
byte r = (byte)((color.R * amount) + (backColor.R * (1 - amount)));
|
|
byte g = (byte)((color.G * amount) + (backColor.G * (1 - amount)));
|
|
byte b = (byte)((color.B * amount) + (backColor.B * (1 - amount)));
|
|
return Color.FromArgb(r, g, b);
|
|
}
|
|
}
|
|
}
|