MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\UISettings.cs (14)
21private static readonly Color _fallbackAccentColor = Color.FromArgb(0xff, 0x00, 0x78, 0xd4);
23private Color _accentColor, _accentLight1, _accentLight2, _accentLight3;
24private Color _accentDark1, _accentDark2, _accentDark3;
56internal bool TryGetColorValue(UISettingsRCW.UIColorType desiredColor, out Color color)
63color = Color.FromArgb(uiColor.A, uiColor.R, uiColor.G, uiColor.B);
90if(TryGetColorValue(UISettingsRCW.UIColorType.Accent, out Color systemAccent))
136internal Color AccentColor => _useFallbackColor ? _fallbackAccentColor : _accentColor;
137internal Color AccentLight1 => _useFallbackColor ? _fallbackAccentColor : _accentLight1;
138internal Color AccentLight2 => _useFallbackColor ? _fallbackAccentColor : _accentLight2;
139internal Color AccentLight3 => _useFallbackColor ? _fallbackAccentColor : _accentLight3;
140internal Color AccentDark1 => _useFallbackColor ? _fallbackAccentColor : _accentDark1;
141internal Color AccentDark2 => _useFallbackColor ? _fallbackAccentColor : _accentDark2;
142internal Color AccentDark3 => _useFallbackColor ? _fallbackAccentColor : _accentDark3;
System\Windows\Media\Animation\Generated\ColorAnimation.cs (32)
43private Color[] _keyValues;
58Type typeofProp = typeof(Color?);
67new PropertyMetadata((Color?)null, propCallback),
74new PropertyMetadata((Color?)null, propCallback),
81new PropertyMetadata((Color?)null, propCallback),
105public ColorAnimation(Color toValue, Duration duration)
117public ColorAnimation(Color toValue, Duration duration, FillBehavior fillBehavior)
130public ColorAnimation(Color fromValue, Color toValue, Duration duration)
143public ColorAnimation(Color fromValue, Color toValue, Duration duration, FillBehavior fillBehavior)
216protected override Color GetCurrentValueCore(Color defaultOriginValue, Color defaultDestinationValue, AnimationClock animationClock)
233Color from = new Color();
234Color to = new Color();
235Color accumulated = new Color();
236Color foundation = new Color();
350Color accumulator = AnimatedTypeHelpers.SubtractColor(to, from);
375_keyValues = new Color[2];
382_keyValues = new Color[2];
389_keyValues = new Color[1];
396_keyValues = new Color[1];
402_keyValues = new Color[1];
423Color? typedValue = (Color?)value;
443public Color? From
447return (Color?)GetValue(FromProperty);
463public Color? To
467return (Color?)GetValue(ToProperty);
483public Color? By
487return (Color?)GetValue(ByProperty);
System\Windows\Media\Color.cs (58)
29public struct Color : IFormattable, IEquatable<Color>
44private static Color FromProfile(Uri profileUri)
46Color c1 = new Color();
74public static Color FromAValues(float a, float[] values, Uri profileUri)
76Color c1 = Color.FromProfile(profileUri);
114public static Color FromValues(float[] values, Uri profileUri)
116Color c1 = Color.FromAValues(1.0f, values, profileUri);
124internal static Color FromUInt32(uint argb)// internal legacy sRGB interface
126Color c1 = new Color();
146public static Color FromScRgb(float a, float r, float g, float b)
148Color c1 = new Color();
177public static Color FromArgb(byte a, byte r, byte g, byte b)// legacy sRGB interface, bytes are required to properly round trip
179Color c1 = new Color();
199public static Color FromRgb(byte r, byte g, byte b)// legacy sRGB interface, bytes are required to properly round trip
201Color c1 = Color.FromArgb(0xff, r, g, b);
328public static bool AreClose(Color color1, Color color2)
340private bool IsClose(Color color)
406public static Color operator +(Color color1, Color color2)
410Color c1 = FromScRgb(
419Color c1 = new Color();
429Color c2 = Color.FromRgb(0, 0, 0);
508public static Color Add(Color color1, Color color2)
520public static Color operator -(Color color1, Color color2)
524Color c1 = FromScRgb(
538Color c1 = new Color();
548Color c2 = Color.FromRgb(0, 0, 0);
627public static Color Subtract(Color color1, Color color2)
638public static Color operator *(Color color, float coefficient)
640Color c1 = FromScRgb(color.scRgbColor.a * coefficient, color.scRgbColor.r * coefficient, color.scRgbColor.g * coefficient, color.scRgbColor.b * coefficient);
660public static Color Multiply(Color color, float coefficient)
668public static bool Equals(Color color1, Color color2)
680public bool Equals(Color color)
694if (o is Color)
696Color color = (Color)o;
711public static bool operator ==(Color color1, Color color2)
780public static bool operator !=(Color color1, Color color2)
1095Color c2 = Color.FromRgb(0, 0, 0);
System\Windows\Media\Parsers.cs (11)
53static private Color ParseHexColor(string trimmedColor)
92return ( Color.FromArgb ((byte)a, (byte)r, (byte)g, (byte)b) );
98static private Color ParseContextColor(string trimmedColor, IFormatProvider formatProvider, ITypeDescriptorContext context)
143Color result = Color.FromAValues(alpha, values, profileUri);
154static private Color ParseScRgbColor(string trimmedColor, IFormatProvider formatProvider)
182return Color.FromScRgb(values[0], values[1], values[2], values[3]);
186return Color.FromScRgb(1.0f, values[0], values[1], values[2]);
195internal static Color ParseColor(string color, IFormatProvider formatProvider)
206internal static Color ParseColor(string color, IFormatProvider formatProvider, ITypeDescriptorContext context)
244return Color.FromUInt32((uint)kc);