using System; using System.Collections.Generic; using System.Text; namespace TEAMModelOS.Test.PPTX.ColorLibrary { /// /// 类 名:ColorHSV /// 功 能:H 色相 \ S 饱和度(纯度) \ V 明度 颜色模型 /// public class ColorHSV { /// /// 构造方法 /// /// /// /// public ColorHSV(int h, int s, int v) { this._h = h; this._s = s; this._v = v; } private int _h; private int _s; private int _v; /// /// 色相 /// public int H { get { return this._h; } set { this._h = value; this._h = this._h > 360 ? 360 : this._h; this._h = this._h < 0 ? 0 : this._h; } } /// /// 饱和度(纯度) /// public int S { get { return this._s; } set { this._s = value; this._s = this._s > 255 ? 255 : this._s; this._s = this._s < 0 ? 0 : this._s; } } /// /// 明度 /// public int V { get { return this._v; } set { this._v = value; this._v = this._v > 255 ? 255 : this._v; this._v = this._v < 0 ? 0 : this._v; } } } }