MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\UISettings.cs (14)
15private static readonly Color _fallbackAccentColor = Color.FromArgb(0xff, 0x00, 0x78, 0xd4);
17private Color _accentColor, _accentLight1, _accentLight2, _accentLight3;
18private Color _accentDark1, _accentDark2, _accentDark3;
50internal bool TryGetColorValue(UISettingsRCW.UIColorType desiredColor, out Color color)
57color = Color.FromArgb(uiColor.A, uiColor.R, uiColor.G, uiColor.B);
84if(TryGetColorValue(UISettingsRCW.UIColorType.Accent, out Color systemAccent))
130internal Color AccentColor => _useFallbackColor ? _fallbackAccentColor : _accentColor;
131internal Color AccentLight1 => _useFallbackColor ? _fallbackAccentColor : _accentLight1;
132internal Color AccentLight2 => _useFallbackColor ? _fallbackAccentColor : _accentLight2;
133internal Color AccentLight3 => _useFallbackColor ? _fallbackAccentColor : _accentLight3;
134internal Color AccentDark1 => _useFallbackColor ? _fallbackAccentColor : _accentDark1;
135internal Color AccentDark2 => _useFallbackColor ? _fallbackAccentColor : _accentDark2;
136internal Color AccentDark3 => _useFallbackColor ? _fallbackAccentColor : _accentDark3;
System\Windows\Media\Animation\Generated\ColorAnimation.cs (32)
32private Color[] _keyValues;
47Type typeofProp = typeof(Color?);
56new PropertyMetadata((Color?)null, propCallback),
63new PropertyMetadata((Color?)null, propCallback),
70new PropertyMetadata((Color?)null, propCallback),
94public ColorAnimation(Color toValue, Duration duration)
106public ColorAnimation(Color toValue, Duration duration, FillBehavior fillBehavior)
119public ColorAnimation(Color fromValue, Color toValue, Duration duration)
132public ColorAnimation(Color fromValue, Color toValue, Duration duration, FillBehavior fillBehavior)
205protected override Color GetCurrentValueCore(Color defaultOriginValue, Color defaultDestinationValue, AnimationClock animationClock)
222Color from = new Color();
223Color to = new Color();
224Color accumulated = new Color();
225Color foundation = new Color();
339Color accumulator = AnimatedTypeHelpers.SubtractColor(to, from);
364_keyValues = new Color[2];
371_keyValues = new Color[2];
378_keyValues = new Color[1];
385_keyValues = new Color[1];
391_keyValues = new Color[1];
412Color? typedValue = (Color?)value;
432public Color? From
436return (Color?)GetValue(FromProperty);
452public Color? To
456return (Color?)GetValue(ToProperty);
472public Color? By
476return (Color?)GetValue(ByProperty);
System\Windows\Media\Color.cs (58)
21public struct Color : IFormattable, IEquatable<Color>
36private static Color FromProfile(Uri profileUri)
38Color c1 = new Color();
66public static Color FromAValues(float a, float[] values, Uri profileUri)
68Color c1 = Color.FromProfile(profileUri);
106public static Color FromValues(float[] values, Uri profileUri)
108Color c1 = Color.FromAValues(1.0f, values, profileUri);
116internal static Color FromUInt32(uint argb)// internal legacy sRGB interface
118Color c1 = new Color();
138public static Color FromScRgb(float a, float r, float g, float b)
140Color c1 = new Color();
169public static Color FromArgb(byte a, byte r, byte g, byte b)// legacy sRGB interface, bytes are required to properly round trip
171Color c1 = new Color();
191public static Color FromRgb(byte r, byte g, byte b)// legacy sRGB interface, bytes are required to properly round trip
193Color c1 = Color.FromArgb(0xff, r, g, b);
320public static bool AreClose(Color color1, Color color2)
332private bool IsClose(Color color)
398public static Color operator +(Color color1, Color color2)
402Color c1 = FromScRgb(
411Color c1 = new Color();
421Color c2 = Color.FromRgb(0, 0, 0);
500public static Color Add(Color color1, Color color2)
512public static Color operator -(Color color1, Color color2)
516Color c1 = FromScRgb(
530Color c1 = new Color();
540Color c2 = Color.FromRgb(0, 0, 0);
619public static Color Subtract(Color color1, Color color2)
630public static Color operator *(Color color, float coefficient)
632Color c1 = FromScRgb(color.scRgbColor.a * coefficient, color.scRgbColor.r * coefficient, color.scRgbColor.g * coefficient, color.scRgbColor.b * coefficient);
652public static Color Multiply(Color color, float coefficient)
660public static bool Equals(Color color1, Color color2)
672public bool Equals(Color color)
686if (o is Color)
688Color color = (Color)o;
703public static bool operator ==(Color color1, Color color2)
772public static bool operator !=(Color color1, Color color2)
1087Color c2 = Color.FromRgb(0, 0, 0);
System\Windows\Media\Parsers.cs (11)
39static private Color ParseHexColor(string trimmedColor)
78return ( Color.FromArgb ((byte)a, (byte)r, (byte)g, (byte)b) );
84static private Color ParseContextColor(string trimmedColor, IFormatProvider formatProvider, ITypeDescriptorContext context)
129Color result = Color.FromAValues(alpha, values, profileUri);
140static private Color ParseScRgbColor(string trimmedColor, IFormatProvider formatProvider)
168return Color.FromScRgb(values[0], values[1], values[2], values[3]);
172return Color.FromScRgb(1.0f, values[0], values[1], values[2]);
181internal static Color ParseColor(string color, IFormatProvider formatProvider)
192internal static Color ParseColor(string color, IFormatProvider formatProvider, ITypeDescriptorContext context)
230return Color.FromUInt32((uint)kc);