using System;
using System.Collections.Generic;
using System.Text;
namespace TEAMModelOS.Test.PPTX.ColorLibrary
{
///
/// 类 名:ColorHSL
/// 功 能:H 色相 \ S 饱和度(纯度) \ L 亮度 颜色模型
///
public class ColorHSL
{
public ColorHSL(int h, int s, int l)
{
this._h = h;
this._s = s;
this._l = l;
}
private int _h;
private int _s;
private int _l;
///
/// 色相
///
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 L
{
get { return this._l; }
set
{
this._l = value;
this._l = this._l > 255 ? 255 : this._l;
this._l = this._l < 0 ? 0 : this._l;
}
}
}
}