- service-manager-tray-for-windows.git
- ServiceManagerTray
- ColorHelper.cs
This file ( 773B ) exceeds the allowed full mode (48 kb) size.
The editor full hight is disabled, only scrolling is allowed..
If you wish to edit a file, it is recommended to use the scroll mode as some users do not like the full height
mode, although some users like it.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
namespace chc.servicemanagertray
{
public static class ColorHelper
{
public static Color ChangeBrightness(this Color instance, int brightness_modifier)
{
return Color.FromArgb(
Math.Min(
Math.Max(instance.R + brightness_modifier, 0),
255
),
Math.Min(
Math.Max(instance.G + brightness_modifier, 0),
255
),
Math.Min(
Math.Max(instance.B + brightness_modifier, 0),
255
)
);
}
}
}