System\Windows\Media\Color.cs (127)
49c1.scRgbColor.a = 1.0f;
50c1.scRgbColor.r = 0.0f;
51c1.scRgbColor.g = 0.0f;
52c1.scRgbColor.b = 0.0f;
93c1.scRgbColor.a = a;
104c1.sRgbColor.r = ScRgbTosRgb(c1.scRgbColor.r);
105c1.sRgbColor.g = ScRgbTosRgb(c1.scRgbColor.g);
106c1.sRgbColor.b = ScRgbTosRgb(c1.scRgbColor.b);
132c1.scRgbColor.a = (float)c1.sRgbColor.a / 255.0f;
133c1.scRgbColor.r = sRgbToScRgb(c1.sRgbColor.r); // note that context is undefined and thus unloaded
134c1.scRgbColor.g = sRgbToScRgb(c1.sRgbColor.g);
135c1.scRgbColor.b = sRgbToScRgb(c1.sRgbColor.b);
150c1.scRgbColor.r = r;
151c1.scRgbColor.g = g;
152c1.scRgbColor.b = b;
153c1.scRgbColor.a = a;
164c1.sRgbColor.r = ScRgbTosRgb(c1.scRgbColor.r);
165c1.sRgbColor.g = ScRgbTosRgb(c1.scRgbColor.g);
166c1.sRgbColor.b = ScRgbTosRgb(c1.scRgbColor.b);
181c1.scRgbColor.a = (float)a / 255.0f;
182c1.scRgbColor.r = sRgbToScRgb(r); // note that context is undefined and thus unloaded
183c1.scRgbColor.g = sRgbToScRgb(g);
184c1.scRgbColor.b = sRgbToScRgb(b);
187c1.sRgbColor.r = ScRgbTosRgb(c1.scRgbColor.r);
188c1.sRgbColor.g = ScRgbTosRgb(c1.scRgbColor.g);
189c1.sRgbColor.b = ScRgbTosRgb(c1.scRgbColor.b);
218return this.scRgbColor.GetHashCode(); //^this.context.GetHashCode();
290separator, scRgbColor.a, scRgbColor.r, scRgbColor.g, scRgbColor.b);
307sb.AppendFormat(provider,"{1:" + format + "}{0}",separator,scRgbColor.a);
347result = result && FloatUtil.AreClose(scRgbColor.r, color.scRgbColor.r);
348result = result && FloatUtil.AreClose(scRgbColor.g, color.scRgbColor.g);
349result = result && FloatUtil.AreClose(scRgbColor.b, color.scRgbColor.b);
357return result && FloatUtil.AreClose(scRgbColor.a, color.scRgbColor.a);
367scRgbColor.r = (scRgbColor.r < 0) ? 0 : (scRgbColor.r > 1.0f) ? 1.0f : scRgbColor.r;
368scRgbColor.g = (scRgbColor.g < 0) ? 0 : (scRgbColor.g > 1.0f) ? 1.0f : scRgbColor.g;
369scRgbColor.b = (scRgbColor.b < 0) ? 0 : (scRgbColor.b > 1.0f) ? 1.0f : scRgbColor.b;
370scRgbColor.a = (scRgbColor.a < 0) ? 0 : (scRgbColor.a > 1.0f) ? 1.0f : scRgbColor.a;
371sRgbColor.a = (byte)(scRgbColor.a * 255f);
372sRgbColor.r = ScRgbTosRgb(scRgbColor.r);
373sRgbColor.g = ScRgbTosRgb(scRgbColor.g);
374sRgbColor.b = ScRgbTosRgb(scRgbColor.b);
411color1.scRgbColor.a + color2.scRgbColor.a,
412color1.scRgbColor.r + color2.scRgbColor.r,
413color1.scRgbColor.g + color2.scRgbColor.g,
414color1.scRgbColor.b + color2.scRgbColor.b);
477c1.scRgbColor.r = sRgbToScRgb(c1.sRgbColor.r);
478c1.scRgbColor.g = sRgbToScRgb(c1.sRgbColor.g);
479c1.scRgbColor.b = sRgbToScRgb(c1.sRgbColor.b);
480c1.scRgbColor.a = color1.scRgbColor.a + color2.scRgbColor.a;
481if (c1.scRgbColor.a < 0.0f)
483c1.scRgbColor.a = 0.0f;
486else if (c1.scRgbColor.a > 1.0f)
488c1.scRgbColor.a = 1.0f;
493c1.sRgbColor.a = (byte)((c1.scRgbColor.a * 255.0f) + 0.5f);
525color1.scRgbColor.a - color2.scRgbColor.a,
526color1.scRgbColor.r - color2.scRgbColor.r,
527color1.scRgbColor.g - color2.scRgbColor.g,
528color1.scRgbColor.b - color2.scRgbColor.b
596c1.scRgbColor.r = sRgbToScRgb(c1.sRgbColor.r);
597c1.scRgbColor.g = sRgbToScRgb(c1.sRgbColor.g);
598c1.scRgbColor.b = sRgbToScRgb(c1.sRgbColor.b);
599c1.scRgbColor.a = color1.scRgbColor.a - color2.scRgbColor.a;
600if (c1.scRgbColor.a < 0.0f)
602c1.scRgbColor.a = 0.0f;
605else if (c1.scRgbColor.a > 1.0f)
607c1.scRgbColor.a = 1.0f;
612c1.sRgbColor.a = (byte)((c1.scRgbColor.a * 255.0f) + 0.5f);
640Color c1 = FromScRgb(color.scRgbColor.a * coefficient, color.scRgbColor.r * coefficient, color.scRgbColor.g * coefficient, color.scRgbColor.b * coefficient);
715if (color1.scRgbColor.r != color2.scRgbColor.r)
720if (color1.scRgbColor.g != color2.scRgbColor.g)
725if (color1.scRgbColor.b != color2.scRgbColor.b)
730if (color1.scRgbColor.a != color2.scRgbColor.a)
766if (color1.scRgbColor.a != color2.scRgbColor.a)
816scRgbColor.a = (float)value / 255.0f;
836scRgbColor.r = sRgbToScRgb(value);
860scRgbColor.g = sRgbToScRgb(value);
884scRgbColor.b = sRgbToScRgb(value);
902return scRgbColor.a;
906scRgbColor.a = value;
931return scRgbColor.r;
938scRgbColor.r = value;
956return scRgbColor.g;
963scRgbColor.g = value;
981return scRgbColor.b;
988scRgbColor.b = value;
1104this.scRgbColor.r = sRgbToScRgb((byte)((255.0f * scRGBValue[0]) + 0.5f));
1105this.scRgbColor.g = sRgbToScRgb((byte)((255.0f * scRGBValue[1]) + 0.5f));
1106this.scRgbColor.b = sRgbToScRgb((byte)((255.0f * scRGBValue[2]) + 0.5f));