System\Windows\Media\Color.cs (127)
41c1.scRgbColor.a = 1.0f;
42c1.scRgbColor.r = 0.0f;
43c1.scRgbColor.g = 0.0f;
44c1.scRgbColor.b = 0.0f;
85c1.scRgbColor.a = a;
96c1.sRgbColor.r = ScRgbTosRgb(c1.scRgbColor.r);
97c1.sRgbColor.g = ScRgbTosRgb(c1.scRgbColor.g);
98c1.sRgbColor.b = ScRgbTosRgb(c1.scRgbColor.b);
124c1.scRgbColor.a = (float)c1.sRgbColor.a / 255.0f;
125c1.scRgbColor.r = sRgbToScRgb(c1.sRgbColor.r); // note that context is undefined and thus unloaded
126c1.scRgbColor.g = sRgbToScRgb(c1.sRgbColor.g);
127c1.scRgbColor.b = sRgbToScRgb(c1.sRgbColor.b);
142c1.scRgbColor.r = r;
143c1.scRgbColor.g = g;
144c1.scRgbColor.b = b;
145c1.scRgbColor.a = a;
156c1.sRgbColor.r = ScRgbTosRgb(c1.scRgbColor.r);
157c1.sRgbColor.g = ScRgbTosRgb(c1.scRgbColor.g);
158c1.sRgbColor.b = ScRgbTosRgb(c1.scRgbColor.b);
173c1.scRgbColor.a = (float)a / 255.0f;
174c1.scRgbColor.r = sRgbToScRgb(r); // note that context is undefined and thus unloaded
175c1.scRgbColor.g = sRgbToScRgb(g);
176c1.scRgbColor.b = sRgbToScRgb(b);
179c1.sRgbColor.r = ScRgbTosRgb(c1.scRgbColor.r);
180c1.sRgbColor.g = ScRgbTosRgb(c1.scRgbColor.g);
181c1.sRgbColor.b = ScRgbTosRgb(c1.scRgbColor.b);
210return this.scRgbColor.GetHashCode(); //^this.context.GetHashCode();
282separator, scRgbColor.a, scRgbColor.r, scRgbColor.g, scRgbColor.b);
299sb.AppendFormat(provider,"{1:" + format + "}{0}",separator,scRgbColor.a);
339result = result && FloatUtil.AreClose(scRgbColor.r, color.scRgbColor.r);
340result = result && FloatUtil.AreClose(scRgbColor.g, color.scRgbColor.g);
341result = result && FloatUtil.AreClose(scRgbColor.b, color.scRgbColor.b);
349return result && FloatUtil.AreClose(scRgbColor.a, color.scRgbColor.a);
359scRgbColor.r = (scRgbColor.r < 0) ? 0 : (scRgbColor.r > 1.0f) ? 1.0f : scRgbColor.r;
360scRgbColor.g = (scRgbColor.g < 0) ? 0 : (scRgbColor.g > 1.0f) ? 1.0f : scRgbColor.g;
361scRgbColor.b = (scRgbColor.b < 0) ? 0 : (scRgbColor.b > 1.0f) ? 1.0f : scRgbColor.b;
362scRgbColor.a = (scRgbColor.a < 0) ? 0 : (scRgbColor.a > 1.0f) ? 1.0f : scRgbColor.a;
363sRgbColor.a = (byte)(scRgbColor.a * 255f);
364sRgbColor.r = ScRgbTosRgb(scRgbColor.r);
365sRgbColor.g = ScRgbTosRgb(scRgbColor.g);
366sRgbColor.b = ScRgbTosRgb(scRgbColor.b);
403color1.scRgbColor.a + color2.scRgbColor.a,
404color1.scRgbColor.r + color2.scRgbColor.r,
405color1.scRgbColor.g + color2.scRgbColor.g,
406color1.scRgbColor.b + color2.scRgbColor.b);
469c1.scRgbColor.r = sRgbToScRgb(c1.sRgbColor.r);
470c1.scRgbColor.g = sRgbToScRgb(c1.sRgbColor.g);
471c1.scRgbColor.b = sRgbToScRgb(c1.sRgbColor.b);
472c1.scRgbColor.a = color1.scRgbColor.a + color2.scRgbColor.a;
473if (c1.scRgbColor.a < 0.0f)
475c1.scRgbColor.a = 0.0f;
478else if (c1.scRgbColor.a > 1.0f)
480c1.scRgbColor.a = 1.0f;
485c1.sRgbColor.a = (byte)((c1.scRgbColor.a * 255.0f) + 0.5f);
517color1.scRgbColor.a - color2.scRgbColor.a,
518color1.scRgbColor.r - color2.scRgbColor.r,
519color1.scRgbColor.g - color2.scRgbColor.g,
520color1.scRgbColor.b - color2.scRgbColor.b
588c1.scRgbColor.r = sRgbToScRgb(c1.sRgbColor.r);
589c1.scRgbColor.g = sRgbToScRgb(c1.sRgbColor.g);
590c1.scRgbColor.b = sRgbToScRgb(c1.sRgbColor.b);
591c1.scRgbColor.a = color1.scRgbColor.a - color2.scRgbColor.a;
592if (c1.scRgbColor.a < 0.0f)
594c1.scRgbColor.a = 0.0f;
597else if (c1.scRgbColor.a > 1.0f)
599c1.scRgbColor.a = 1.0f;
604c1.sRgbColor.a = (byte)((c1.scRgbColor.a * 255.0f) + 0.5f);
632Color c1 = FromScRgb(color.scRgbColor.a * coefficient, color.scRgbColor.r * coefficient, color.scRgbColor.g * coefficient, color.scRgbColor.b * coefficient);
707if (color1.scRgbColor.r != color2.scRgbColor.r)
712if (color1.scRgbColor.g != color2.scRgbColor.g)
717if (color1.scRgbColor.b != color2.scRgbColor.b)
722if (color1.scRgbColor.a != color2.scRgbColor.a)
758if (color1.scRgbColor.a != color2.scRgbColor.a)
808scRgbColor.a = (float)value / 255.0f;
828scRgbColor.r = sRgbToScRgb(value);
852scRgbColor.g = sRgbToScRgb(value);
876scRgbColor.b = sRgbToScRgb(value);
894return scRgbColor.a;
898scRgbColor.a = value;
923return scRgbColor.r;
930scRgbColor.r = value;
948return scRgbColor.g;
955scRgbColor.g = value;
973return scRgbColor.b;
980scRgbColor.b = value;
1096this.scRgbColor.r = sRgbToScRgb((byte)((255.0f * scRGBValue[0]) + 0.5f));
1097this.scRgbColor.g = sRgbToScRgb((byte)((255.0f * scRGBValue[1]) + 0.5f));
1098this.scRgbColor.b = sRgbToScRgb((byte)((255.0f * scRGBValue[2]) + 0.5f));