Example #1
0
        public void Set(HSLColor color)
        {
            float h, s, v;

            color.ToHSV(out h, out s, out v);

            if (H != h || S != s || V != v)
            {
                if (H != h)
                {
                    H = h;
                    GenerateBitmap();
                }

                S = s.Clamp(SRange[0], SRange[1]);
                V = v.Clamp(VRange[0], VRange[1]);
                OnChange();
            }
        }
Example #2
0
		public void Set(HSLColor color)
		{
			float h,s,v;
			color.ToHSV(out h, out s, out v);

			if (H != h || S != s || V != v)
			{
				if (H != h)
				{
					H = h;
					GenerateBitmap();
				}

				S = s.Clamp(SRange[0], SRange[1]);
				V = v.Clamp(VRange[0], VRange[1]);
				OnChange();
			}
		}