mirror of
https://github.com/kwsch/NHSE.git
synced 2026-07-17 00:31:10 -05:00
most complex editor yet could be better if I did PictureBox'es instead of buttons, so I could put an image instead of just color ppl will have to document more on what each terrain looks like, maybe could show a pic of each terrain tile?
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);
|
|
}
|
|
}
|
|
}
|