예제 #1
0
        /// <summary>
        /// 修改颜色饱和度
        /// </summary>
        /// <param name="c">颜色</param>
        /// <param name="Saturation">饱和度</param>
        /// <returns></returns>
        public static Color ModifySaturation(Color c, double Saturation)
        {
            HSB hsb = RGB.ToHSB(c);

            hsb.Saturation *= Saturation;
            return(hsb.ToColor());
        }
예제 #2
0
        /// <summary>
        /// 调整颜色的明亮度
        /// </summary>
        /// <param name="c">颜色</param>
        /// <param name="brightness">亮度</param>
        /// <returns></returns>
        public static Color ModifyBrightness(Color c, double brightness)
        {
            HSB hsb = RGB.ToHSB(c);

            hsb.Brightness *= brightness;
            return(hsb.ToColor());
        }
예제 #3
0
        /// <summary>
        /// 修改颜色的色调
        /// </summary>
        /// <param name="c">颜色</param>
        /// <param name="Hue">色调</param>
        /// <returns></returns>
        public static Color ModifyHue(Color c, double Hue)
        {
            HSB hsb = RGB.ToHSB(c);

            hsb.Hue *= Hue;
            return(hsb.ToColor());
        }