22 instantiations of Color
Microsoft.Maui (1)
Animations\AnimationLerpingExtensions.cs (1)
17
return new
Color
(r, g, b, a);
Microsoft.Maui.Controls (4)
Compatibility\Handlers\FlyoutPage\iOS\PhoneFlyoutPageRenderer.cs (1)
101
_clickOffView.BackgroundColor = new
Color
(0, 0, 0, 0).ToPlatform();
Compatibility\Handlers\Shell\iOS\ShellSectionRootHeader.cs (2)
18
Color _defaultBackgroundColor = new
Color
(0.964f);
44
CollectionView.BackgroundColor = new
Color
(backgroundColor.Red, backgroundColor.Green, backgroundColor.Blue, .863f).ToPlatform();
KnownColor.cs (1)
13
public static Color Transparent { get; } =
new
(255, 255, 255, 0);
Microsoft.Maui.Controls.Compatibility (1)
iOS\Renderers\PhoneFlyoutPageRenderer.cs (1)
89
_clickOffView.BackgroundColor = new
Color
(0, 0, 0, 0).ToPlatform();
Microsoft.Maui.Graphics (15)
CanvasDefaults.cs (1)
5
public static readonly Color DefaultShadowColor = new
Color
(0f, 0f, 0f, .5f);
Color.cs (13)
156
return new
Color
(Red, Green, Blue, alpha);
161
return new
Color
(Red, Green, Blue, Alpha * multiplyBy);
296
return new
Color
(red / 255f, green / 255f, blue / 255f, 1f);
301
return new
Color
(red / 255f, green / 255f, blue / 255f, alpha / 255f);
306
return new
Color
(red / 255f, green / 255f, blue / 255f, 1f);
311
return new
Color
(red / 255f, green / 255f, blue / 255f, alpha / 255f);
326
return new
Color
(r, g, b, a);
331
return new
Color
((float)r, (float)g, (float)b, (float)a);
452
return new
Color
(red, green, blue, a);
459
return new
Color
(red, green, blue, (float)a);
625
color = new
Color
((float)r, (float)g, (float)b, (float)a);
646
color = new
Color
((float)r, (float)g, (float)b);
1038
public static implicit operator Color(Vector4 color) => new
Color
(color);
GradientPaint.cs (1)
255
return new
Color
(r, g, b, a);
Microsoft.Maui.Graphics.Skia (1)
SKGraphicsExtensions.cs (1)
61
return new
Color
(r, g, b, a);
955 references to Color
Microsoft.Maui (34)
Animations\AnimationLerpingExtensions.cs (5)
7
public static
Color
Lerp(this
Color
color,
Color
endColor, double progress)
60
var
color = paint?.Color ?? Colors.Black;
61
var
endColor = endPaint?.Color ?? Colors.Black;
Animations\Lerp.cs (5)
80
[typeof(
Color
)] = new Lerp
84
var
start = (
Color
)s;
85
var
end = (
Color
)e;
Core\IActivityIndicator.cs (1)
19
Color
Color { get; }
Core\IButtonStroke.cs (1)
13
Color
StrokeColor { get; }
Core\IPicker.cs (1)
25
Color
TitleColor { get; }
Core\IPlaceholder.cs (1)
18
Color
PlaceholderColor { get; set; }
Core\IProgress.cs (1)
20
Color
ProgressColor { get; }
Core\ISearchBar.cs (1)
13
Color
CancelButtonColor { get; }
Core\ISlider.cs (3)
13
Color
MinimumTrackColor { get; }
18
Color
MaximumTrackColor { get; }
23
Color
ThumbColor { get; }
Core\ISwitch.cs (2)
18
Color
TrackColor { get; }
23
Color
ThumbColor { get; }
Core\ITextStyle.cs (1)
13
Color
TextColor { get; }
Graphics\PaintExtensions.cs (1)
8
public static
Color
? ToColor(this Paint? paint)
ImageSources\IFontImageSource.cs (1)
8
Color
Color { get; }
Platform\SwipeViewExtensions.cs (2)
10
public static
Color
? GetTextColor(this ISwipeItemMenuItem swipeItemMenuItem)
12
Color
? backgroundColor = swipeItemMenuItem.Background?.ToColor();
VisualDiagnostics\RectangleAdorner.cs (6)
24
public RectangleAdorner(IView view, float density = 1, Point? offset = null,
Color
? fillColor = null,
Color
? strokeColor = null)
26
FillColor = fillColor ??
Color
.FromRgba(225, 0, 0, 125);
27
StrokeColor = strokeColor ??
Color
.FromRgba(225, 0, 0, 125);
48
public
Color
FillColor { get; }
50
public
Color
StrokeColor { get; }
VisualDiagnostics\RectangleGridAdorner.cs (2)
20
public RectangleGridAdorner(IView view, float density = 1, Point? offset = null,
Color
? fillColor = null,
Color
? strokeColor = null)
Microsoft.Maui.Controls (435)
ActivityIndicator\ActivityIndicator.cs (2)
25
public
Color
Color
27
get { return (
Color
)GetValue(ColorElement.ColorProperty); }
Application\Application.cs (3)
207
static
Color
? _accentColor;
208
public static
Color
? AccentColor
215
static
Color
? GetAccentColor()
BarElement.cs (4)
10
BindableProperty.Create(nameof(IBarElement.BarBackgroundColor), typeof(
Color
), typeof(IBarElement), default(
Color
));
18
BindableProperty.Create(nameof(IBarElement.BarTextColor), typeof(
Color
), typeof(IBarElement), default(
Color
));
BindableObjectExtensions.cs (2)
215
public static void SetAppThemeColor(this BindableObject self, BindableProperty targetProperty,
Color
light,
Color
dark)
BindableProperty.cs (1)
47
{ typeof(Maui.Graphics.
Color
), new ColorTypeConverter() },
BorderElement.cs (3)
13
BindableProperty.Create(nameof(IBorderElement.BorderColor), typeof(
Color
), typeof(IBorderElement), null,
24
((IBorderElement)bindable).OnBorderColorPropertyChanged((
Color
)oldValue, (
Color
)newValue);
BoxView\BoxView.cs (2)
27
public
Color
Color
29
get => (
Color
)GetValue(ColorElement.ColorProperty);
Brush\Brush.cs (1)
101
public static implicit operator Brush(
Color
color) => new SolidColorBrush(color);
Brush\BrushTypeConverter.cs (14)
34
|| sourceType == typeof(
Color
)
42
if (value is
Color
colorValue)
68
var
color = (
Color
)_colorTypeConverter.ConvertFromInvariantString(strValue);
77
var
color = (
Color
)_colorTypeConverter.ConvertFromInvariantString(strValue);
128
var
color = (
Color
)_colorConverter.ConvertFromInvariantString(parts[0]);
141
var
color = (
Color
)_colorConverter.ConvertFromInvariantString(parts[0]);
172
var
color = (
Color
)_colorConverter.ConvertFromInvariantString(colorString.ToString());
249
void AddGradientStop(
Color
color, float? offset = null)
265
void AddGradientStops(
Color
color, IEnumerable<float> offsets)
Button\Button.cs (13)
150
public
Color
BorderColor
152
get { return (
Color
)GetValue(BorderElement.BorderColorProperty); }
227
/// Gets or sets the <see cref="
Color
" /> for the text of the button. This is a bindable property.
229
public
Color
TextColor
231
get { return (
Color
)GetValue(TextElement.TextColorProperty); }
413
Color
IBorderElement.BorderColorDefaultValue => (
Color
)BorderColorProperty.DefaultValue;
417
void ITextElement.OnTextColorPropertyChanged(
Color
oldValue,
Color
newValue)
427
void IBorderElement.OnBorderColorPropertyChanged(
Color
oldValue,
Color
newValue)
517
Color
IButtonStroke.StrokeColor => (
Color
)GetValue(BorderColorProperty);
Cells\EntryCell.cs (3)
21
public static readonly BindableProperty LabelColorProperty = BindableProperty.Create(nameof(LabelColor), typeof(
Color
), typeof(EntryCell), null);
62
public
Color
LabelColor
64
get { return (
Color
)GetValue(LabelColorProperty); }
Cells\SwitchCell.cs (3)
21
public static readonly BindableProperty OnColorProperty = BindableProperty.Create(nameof(OnColor), typeof(
Color
), typeof(SwitchCell), null);
24
public
Color
OnColor
26
get { return (
Color
)GetValue(OnColorProperty); }
Cells\TextCell.cs (6)
48
public static readonly BindableProperty TextColorProperty = BindableProperty.Create(nameof(TextColor), typeof(
Color
), typeof(TextCell), null);
51
public static readonly BindableProperty DetailColorProperty = BindableProperty.Create(nameof(DetailColor), typeof(
Color
), typeof(TextCell), null);
75
public
Color
DetailColor
77
get { return (
Color
)GetValue(DetailColorProperty); }
89
public
Color
TextColor
91
get { return (
Color
)GetValue(TextColorProperty); }
CheckBox\CheckBox.cs (6)
28
public
Color
Color
30
get => (
Color
)GetValue(ColorProperty);
60
void IBorderElement.OnBorderColorPropertyChanged(
Color
oldValue,
Color
newValue)
64
Color
IBorderElement.BorderColor => Colors.Transparent;
68
Color
IBorderElement.BorderColorDefaultValue => Colors.Transparent;
ColorElement.cs (2)
7
/// <summary>Bindable property for <see cref="
Color
"/>.</summary>
9
BindableProperty.Create(nameof(IColorElement.Color), typeof(
Color
), typeof(IColorElement), null);
Compatibility\Handlers\ListView\iOS\CellRenderer.cs (1)
112
var
defaultBgColor = cell.On<PlatformConfiguration.iOS>().DefaultBackgroundColor();
Compatibility\Handlers\ListView\iOS\EntryCellRenderer.cs (1)
16
static readonly
Color
DefaultTextColor = Microsoft.Maui.Platform.ColorExtensions.LabelColor.ToColor();
Compatibility\Handlers\ListView\iOS\ListViewRenderer.cs (3)
109
var
backgroundColor = solidColorBrush.Color;
721
var
color = Element.SeparatorColor;
757
var
color = Element.RefreshControlColor;
Compatibility\Handlers\ListView\iOS\TextCellRenderer.cs (2)
12
readonly
Color
DefaultDetailColor = Microsoft.Maui.Platform.ColorExtensions.SecondaryLabelColor.ToColor();
13
readonly
Color
DefaultTextColor = Microsoft.Maui.Platform.ColorExtensions.LabelColor.ToColor();
Compatibility\Handlers\NavigationPage\iOS\NavigationRenderer.cs (4)
717
var
barBackgroundColor = NavPage.BarBackgroundColor;
780
var
barTextColor = NavPage.BarTextColor;
823
var
iconColor = Current is Page current ? NavigationPage.GetIconColor(current) : null;
834
var
barTextColor = NavPage.BarTextColor;
Compatibility\Handlers\Shell\iOS\SafeShellTabBarAppearanceTracker.cs (13)
30
var
backgroundColor = appearanceElement.EffectiveTabBarBackgroundColor;
31
var
foregroundColor = appearanceElement.EffectiveTabBarForegroundColor; // Currently unused
32
var
disabledColor = appearanceElement.EffectiveTabBarDisabledColor; // Unused on iOS
33
var
unselectedColor = appearanceElement.EffectiveTabBarUnselectedColor;
34
var
titleColor = appearanceElement.EffectiveTabBarTitleColor;
74
var
backgroundColor = appearanceElement.EffectiveTabBarBackgroundColor;
75
var
foregroundColor = appearanceElement.EffectiveTabBarForegroundColor;
76
var
unselectedColor = appearanceElement.EffectiveTabBarUnselectedColor;
77
var
titleColor = appearanceElement.EffectiveTabBarTitleColor;
94
var
backgroundColor = appearanceElement.EffectiveTabBarBackgroundColor;
95
var
foregroundColor = appearanceElement.EffectiveTabBarForegroundColor;
96
var
unselectedColor = appearanceElement.EffectiveTabBarUnselectedColor;
97
var
titleColor = appearanceElement.EffectiveTabBarTitleColor;
Compatibility\Handlers\Shell\iOS\SearchHandlerAppearanceTracker.cs (11)
147
var
backGroundColor = _searchHandler.BackgroundColor;
175
var
cancelColor = _searchHandler.CancelButtonColor;
199
var
targetColor = _searchHandler.PlaceholderColor;
200
var
placeHolderColor = targetColor ?? Microsoft.Maui.Platform.ColorExtensions.PlaceholderColor.ToColor();
230
var
targetColor = _searchHandler.TextColor;
238
void UpdateSearchBarTintColor(
Color
targetColor)
243
void UpdateSearchButtonIconColor(
Color
targetColor)
252
void UpdateClearPlaceholderIconColor(
Color
targetColor)
268
void UpdateClearIconColor(
Color
targetColor)
353
static void SetSearchBarIconColor(UIImageView imageView,
Color
targetColor, UIColor defaultTintColor)
365
static void SetSearchBarIconColor(UIButton button,
Color
targetColor, UIColor defaultTintColor)
Compatibility\Handlers\Shell\iOS\ShellFlyoutContentRenderer.cs (1)
233
var
color = _shellContext.Shell.FlyoutBackgroundColor;
Compatibility\Handlers\Shell\iOS\ShellItemRenderer.cs (1)
337
cell.TextLabel.TextColor =
Color
.FromRgb(213, 213, 213).ToPlatform();
Compatibility\Handlers\Shell\iOS\ShellNavBarAppearanceTracker.cs (6)
111
var
foreground = appearance.ForegroundColor;
117
var
background = appearance.BackgroundColor;
123
var
titleColor = appearance.TitleColor;
133
var
background = appearance.BackgroundColor;
134
var
foreground = appearance.ForegroundColor;
135
var
titleColor = appearance.TitleColor;
Compatibility\Handlers\Shell\iOS\ShellSectionRootHeader.cs (8)
18
Color
_defaultBackgroundColor = new Color(0.964f);
19
Color
_defaultForegroundColor = Colors.Black;
20
Color
_defaultUnselectedColor = Colors.Black.MultiplyAlpha(0.7f);
42
void SetValues(
Color
backgroundColor,
Color
foregroundColor,
Color
unselectedColor)
62
Color
_selectedColor;
63
Color
_unselectedColor;
Compatibility\Handlers\TabbedPage\iOS\TabbedRenderer.cs (2)
337
var
barBackgroundColor = tabbed.BarBackgroundColor;
374
var
barTextColor = tabbed.BarTextColor;
Compatibility\Handlers\TableView\iOS\TableViewModelRenderer.cs (1)
98
var
sectionHeaderTextColor = table.Model.GetSectionTextColor((int)section);
Compatibility\Handlers\VisualElementRenderer.cs (1)
181
protected virtual void SetBackgroundColor(
Color
? color)
ControlsColorExtensions.cs (2)
9
public static bool IsDefault(this Graphics.
Color
color)
14
public static bool IsNotDefault(this Graphics.
Color
color)
DatePicker\DatePicker.cs (4)
89
public
Color
TextColor
91
get { return (
Color
)GetValue(TextElement.TextColorProperty); }
220
void ITextElement.OnTextColorPropertyChanged(
Color
oldValue,
Color
newValue)
FontImageSource.cs (4)
13
public static readonly BindableProperty ColorProperty = BindableProperty.Create(nameof(Color), typeof(
Color
), typeof(FontImageSource), default(
Color
),
17
public
Color
Color
19
get => (
Color
)GetValue(ColorProperty);
Frame\Frame.cs (6)
44
public
Color
BorderColor
46
get { return (
Color
)GetValue(BorderElement.BorderColorProperty); }
63
Color
IBorderElement.BorderColorDefaultValue => (
Color
)BorderColorProperty.DefaultValue;
73
void IBorderElement.OnBorderColorPropertyChanged(
Color
oldValue,
Color
newValue)
GradientStop.cs (4)
11
nameof(Color), typeof(
Color
), typeof(GradientStop), null);
14
public
Color
Color
16
get => (
Color
)GetValue(ColorProperty);
35
public GradientStop(
Color
color, float offset)
IBarElement.cs (2)
8
Color
BarBackgroundColor { get; }
10
Color
BarTextColor { get; }
IBorderElement.cs (5)
11
Color
BorderColor { get; }
13
Color
BackgroundColor { get; }
18
void OnBorderColorPropertyChanged(
Color
oldValue,
Color
newValue);
25
Color
BorderColorDefaultValue { get; }
IColorElement.cs (1)
9
Color
Color { get; }
ImageButton\ImageButton.cs (8)
69
public
Color
BorderColor
71
get { return (
Color
)GetValue(BorderElement.BorderColorProperty); }
165
Color
IBorderElement.BorderColorDefaultValue => (
Color
)BorderColorProperty.DefaultValue;
169
void IBorderElement.OnBorderColorPropertyChanged(
Color
oldValue,
Color
newValue)
288
Color
IButtonStroke.StrokeColor => (
Color
)GetValue(BorderColorProperty);
ImmutableBrush.cs (4)
10
BindableProperty.CreateReadOnly(nameof(Color), typeof(
Color
), typeof(ImmutableBrush), null);
14
public ImmutableBrush(
Color
color)
19
public override
Color
Color
21
get => (
Color
)GetValue(ColorProperty);
IndicatorView\IndicatorStackLayout.cs (3)
132
Color
GetColorOrDefault(
Color
? color,
Color
defaultColor) => color ?? defaultColor;
IndicatorView\IndicatorView.cs (6)
39
public static readonly BindableProperty IndicatorColorProperty = BindableProperty.Create(nameof(IndicatorColor), typeof(
Color
), typeof(IndicatorView), Colors.LightGrey);
42
public static readonly BindableProperty SelectedIndicatorColorProperty = BindableProperty.Create(nameof(SelectedIndicatorColor), typeof(
Color
), typeof(IndicatorView), Colors.Black);
106
public
Color
IndicatorColor
108
get => (
Color
)GetValue(IndicatorColorProperty);
113
public
Color
SelectedIndicatorColor
115
get => (
Color
)GetValue(SelectedIndicatorColorProperty);
InputView\InputView.cs (6)
119
public
Color
PlaceholderColor
121
get => (
Color
)GetValue(PlaceholderColorProperty);
126
public
Color
TextColor
128
get => (
Color
)GetValue(TextColorProperty);
153
void ITextElement.OnTextColorPropertyChanged(
Color
oldValue,
Color
newValue)
IPlaceholderElement.cs (1)
9
Color
PlaceholderColor { get; }
ITableModel.cs (1)
15
Color
GetSectionTextColor(int section);
ITextElement.cs (3)
11
Color
TextColor { get; }
14
void OnTextColorPropertyChanged(
Color
oldValue,
Color
newValue);
KnownColor.cs (4)
11
public static
Color
Default => null;
13
public static
Color
Transparent { get; } = new(255, 255, 255, 0);
15
public static void SetAccent(
Color
value) => Accent = value;
17
public static
Color
Accent { get; internal set; }
Label\Label.cs (4)
159
public
Color
TextColor
161
get { return (
Color
)GetValue(TextElement.TextColorProperty); }
376
void ITextElement.OnTextColorPropertyChanged(
Color
oldValue,
Color
newValue)
ListView\ListView.cs (6)
74
public static readonly BindableProperty SeparatorColorProperty = BindableProperty.Create(nameof(SeparatorColor), typeof(
Color
), typeof(ListView), null);
77
public static readonly BindableProperty RefreshControlColorProperty = BindableProperty.Create(nameof(RefreshControlColor), typeof(
Color
), typeof(ListView), null);
268
public
Color
SeparatorColor
270
get { return (
Color
)GetValue(SeparatorColorProperty); }
275
public
Color
RefreshControlColor
277
get { return (
Color
)GetValue(RefreshControlColorProperty); }
Menu\MenuItem.cs (1)
154
Color
ITextStyle.TextColor => null;
NavigationPage\NavigationPage.cs (8)
40
public static readonly BindableProperty IconColorProperty = BindableProperty.CreateAttached("IconColor", typeof(
Color
), typeof(NavigationPage), null);
93
public
Color
BarBackgroundColor
95
get => (
Color
)GetValue(BarElement.BarBackgroundColorProperty);
107
public
Color
BarTextColor
109
get => (
Color
)GetValue(BarElement.BarTextColorProperty);
197
public static
Color
GetIconColor(BindableObject bindable)
204
return (
Color
)bindable.GetValue(IconColorProperty);
358
public static void SetIconColor(BindableObject bindable,
Color
value)
NavigationPage\NavigationPageToolbar.cs (6)
14
Color
_barTextColor;
15
Color
_iconColor;
25
public override
Color
BarTextColor { get => GetBarTextColor(); set => SetProperty(ref _barTextColor, value); }
26
public override
Color
IconColor { get => GetIconColor(); set => SetProperty(ref _iconColor, value); }
267
Color
GetBarTextColor() => _currentNavigationPage?.BarTextColor;
268
Color
GetIconColor() => (_currentPage != null) ? NavigationPage.GetIconColor(_currentPage) : null;
Picker\Picker.cs (8)
30
BindableProperty.Create(nameof(TitleColor), typeof(
Color
), typeof(Picker), default(
Color
));
160
public
Color
TextColor
162
get { return (
Color
)GetValue(TextElement.TextColorProperty); }
181
public
Color
TitleColor
183
get { return (
Color
)GetValue(TitleColorProperty); }
416
void ITextElement.OnTextColorPropertyChanged(
Color
oldValue,
Color
newValue)
PlaceholderElement.cs (2)
14
BindableProperty.Create(nameof(IPlaceholderElement.PlaceholderColor), typeof(
Color
), typeof(IPlaceholderElement), default(
Color
));
Platform\iOS\ControlsModalWrapper.cs (2)
34
Color
modalBkgndColor = ((Page)_modal.VirtualView).BackgroundColor;
194
Color
modalBkgndColor = Page.BackgroundColor;
Platform\iOS\Extensions\BrushExtensions.cs (1)
250
var
color = gradientStops[index == 0 ? index + 1 : index - 1].Color;
Platform\iOS\Extensions\FormattedStringExtensions.cs (2)
39
Color
? defaultColor = null,
65
Color
? defaultColor = null,
Platform\iOS\Extensions\TextExtensions.cs (1)
19
var
color = entry.OnThisPlatform().GetCursorColor();
PlatformConfiguration\AndroidSpecific\ImageButton.cs (6)
40
public static readonly BindableProperty ShadowColorProperty = BindableProperty.Create("ShadowColor", typeof(
Color
), typeof(ImageButton), null);
43
public static
Color
GetShadowColor(BindableObject element)
45
return (
Color
)element.GetValue(ShadowColorProperty);
49
public static void SetShadowColor(BindableObject element,
Color
value)
55
public static
Color
GetShadowColor(this IPlatformElementConfiguration<Android, FormsImageButton> config)
61
public static IPlatformElementConfiguration<Android, FormsImageButton> SetShadowColor(this IPlatformElementConfiguration<Android, FormsImageButton> config,
Color
value)
PlatformConfiguration\iOSSpecific\Cell.cs (6)
11
public static readonly BindableProperty DefaultBackgroundColorProperty = BindableProperty.Create(nameof(DefaultBackgroundColor), typeof(
Color
), typeof(Cell), null);
14
public static
Color
GetDefaultBackgroundColor(BindableObject element)
15
=> (
Color
)element.GetValue(DefaultBackgroundColorProperty);
18
public static void SetDefaultBackgroundColor(BindableObject element,
Color
value)
22
public static
Color
DefaultBackgroundColor(this IPlatformElementConfiguration<iOS, FormsElement> config)
26
public static IPlatformElementConfiguration<iOS, FormsElement> SetDefaultBackgroundColor(this IPlatformElementConfiguration<iOS, FormsElement> config,
Color
value)
PlatformConfiguration\iOSSpecific\Entry.cs (6)
18
public static readonly BindableProperty CursorColorProperty = BindableProperty.Create("CursorColor", typeof(
Color
), typeof(Entry), null);
63
public static
Color
GetCursorColor(BindableObject element)
65
return (
Color
)element.GetValue(CursorColorProperty);
69
public static void SetCursorColor(BindableObject element,
Color
value)
75
public static
Color
GetCursorColor(this IPlatformElementConfiguration<iOS, FormsElement> config)
81
public static IPlatformElementConfiguration<iOS, FormsElement> SetCursorColor(this IPlatformElementConfiguration<iOS, FormsElement> config,
Color
value)
PlatformConfiguration\iOSSpecific\VisualElement.cs (6)
139
BindableProperty.Create("ShadowColor", typeof(
Color
),
147
public static
Color
GetShadowColor(BindableObject element)
149
return (
Color
)element.GetValue(ShadowColorProperty);
157
public static void SetShadowColor(BindableObject element,
Color
value)
167
public static
Color
GetShadowColor(this IPlatformElementConfiguration<iOS, FormsElement> config)
178
public static IPlatformElementConfiguration<iOS, FormsElement> SetShadowColor(this IPlatformElementConfiguration<iOS, FormsElement> config,
Color
value)
PlatformConfiguration\TizenSpecific\Image.cs (6)
11
public static readonly BindableProperty BlendColorProperty = BindableProperty.Create("BlendColor", typeof(
Color
), typeof(FormsElement), null);
17
public static
Color
GetBlendColor(BindableObject element)
19
return (
Color
)element.GetValue(BlendColorProperty);
23
public static void SetBlendColor(BindableObject element,
Color
color)
29
public static
Color
GetBlendColor(this IPlatformElementConfiguration<Tizen, FormsElement> config)
35
public static IPlatformElementConfiguration<Tizen, FormsElement> SetBlendColor(this IPlatformElementConfiguration<Tizen, FormsElement> config,
Color
color)
PlatformConfiguration\TizenSpecific\Switch.cs (8)
11
/// <summary>Bindable property for <see cref="
Color
"/>.</summary>
12
public static readonly BindableProperty ColorProperty = BindableProperty.Create(nameof(
Color
), typeof(
Color
), typeof(FormsElement), null);
15
public static
Color
GetColor(BindableObject element)
17
return (
Color
)element.GetValue(ColorProperty);
21
public static void SetColor(BindableObject element,
Color
color)
27
public static
Color
GetColor(this IPlatformElementConfiguration<Tizen, FormsElement> config)
33
public static IPlatformElementConfiguration<Tizen, FormsElement> SetColor(this IPlatformElementConfiguration<Tizen, FormsElement> config,
Color
color)
ProgressBar\ProgressBar.cs (3)
14
public static readonly BindableProperty ProgressColorProperty = BindableProperty.Create(nameof(ProgressColor), typeof(
Color
), typeof(ProgressBar), null);
28
public
Color
ProgressColor
30
get { return (
Color
)GetValue(ProgressColorProperty); }
RadioButton\RadioButton.cs (12)
138
public
Color
TextColor
140
get { return (
Color
)GetValue(TextColorProperty); }
194
public
Color
BorderColor
196
get { return (
Color
)GetValue(BorderColorProperty); }
237
void ITextElement.OnTextColorPropertyChanged(
Color
oldValue,
Color
newValue)
271
Color
IBorderElement.BorderColorDefaultValue => (
Color
)BorderElement.BorderColorProperty.DefaultValue;
275
void IBorderElement.OnBorderColorPropertyChanged(
Color
oldValue,
Color
newValue)
663
Color
IButtonStroke.StrokeColor => (
Color
)GetValue(BorderColorProperty);
RefreshView\RefreshView.cs (3)
100
BindableProperty.Create(nameof(RefreshColor), typeof(
Color
), typeof(RefreshView), null);
103
public
Color
RefreshColor
105
get { return (
Color
)GetValue(RefreshColorProperty); }
SearchBar\SearchBar.cs (4)
27
public static readonly BindableProperty CancelButtonColorProperty = BindableProperty.Create(nameof(CancelButtonColor), typeof(
Color
), typeof(SearchBar), default(
Color
));
73
public
Color
CancelButtonColor
75
get { return (
Color
)GetValue(CancelButtonColorProperty); }
Shell\IShellAppearanceElement.cs (5)
8
Color
EffectiveTabBarBackgroundColor { get; }
9
Color
EffectiveTabBarDisabledColor { get; }
10
Color
EffectiveTabBarForegroundColor { get; }
11
Color
EffectiveTabBarTitleColor { get; }
12
Color
EffectiveTabBarUnselectedColor { get; }
Shell\SearchHandler.cs (13)
138
public
Color
TextColor
140
get { return (
Color
)GetValue(TextElement.TextColorProperty); }
145
public static readonly BindableProperty CancelButtonColorProperty = BindableProperty.Create(nameof(CancelButtonColor), typeof(
Color
), typeof(SearchHandler), default(
Color
));
184
public
Color
CancelButtonColor
186
get { return (
Color
)GetValue(CancelButtonColorProperty); }
246
public
Color
PlaceholderColor
248
get => (
Color
)GetValue(PlaceholderElement.PlaceholderColorProperty);
260
public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(
Color
), typeof(SearchHandler), null);
263
public
Color
BackgroundColor
265
get { return (
Color
)GetValue(BackgroundColorProperty); }
639
void ITextElement.OnTextColorPropertyChanged(
Color
oldValue,
Color
newValue)
Shell\Shell.cs (46)
360
BindableProperty.CreateAttached("BackgroundColor", typeof(
Color
), typeof(Shell), null,
367
BindableProperty.CreateAttached("DisabledColor", typeof(
Color
), typeof(Shell), null,
374
BindableProperty.CreateAttached("ForegroundColor", typeof(
Color
), typeof(Shell), null,
381
BindableProperty.CreateAttached("TabBarBackgroundColor", typeof(
Color
), typeof(Shell), null,
388
BindableProperty.CreateAttached("TabBarDisabledColor", typeof(
Color
), typeof(Shell), null,
393
BindableProperty.CreateAttached("TabBarForegroundColor", typeof(
Color
), typeof(Shell), null,
400
BindableProperty.CreateAttached("TabBarTitleColor", typeof(
Color
), typeof(Shell), null,
407
BindableProperty.CreateAttached("TabBarUnselectedColor", typeof(
Color
), typeof(Shell), null,
414
BindableProperty.CreateAttached("TitleColor", typeof(
Color
), typeof(Shell), null,
421
BindableProperty.CreateAttached("UnselectedColor", typeof(
Color
), typeof(Shell), null,
452
public static
Color
GetBackgroundColor(BindableObject obj) => (
Color
)obj.GetValue(BackgroundColorProperty);
460
public static void SetBackgroundColor(BindableObject obj,
Color
value) => obj.SetValue(BackgroundColorProperty, value);
467
public static
Color
GetDisabledColor(BindableObject obj) => (
Color
)obj.GetValue(DisabledColorProperty);
474
public static void SetDisabledColor(BindableObject obj,
Color
value) => obj.SetValue(DisabledColorProperty, value);
481
public static
Color
GetForegroundColor(BindableObject obj) => (
Color
)obj.GetValue(ForegroundColorProperty);
489
public static void SetForegroundColor(BindableObject obj,
Color
value) => obj.SetValue(ForegroundColorProperty, value);
496
public static
Color
GetTabBarBackgroundColor(BindableObject obj) => (
Color
)obj.GetValue(TabBarBackgroundColorProperty);
504
public static void SetTabBarBackgroundColor(BindableObject obj,
Color
value) => obj.SetValue(TabBarBackgroundColorProperty, value);
511
public static
Color
GetTabBarDisabledColor(BindableObject obj) => (
Color
)obj.GetValue(TabBarDisabledColorProperty);
519
public static void SetTabBarDisabledColor(BindableObject obj,
Color
value) => obj.SetValue(TabBarDisabledColorProperty, value);
526
public static
Color
GetTabBarForegroundColor(BindableObject obj) => (
Color
)obj.GetValue(TabBarForegroundColorProperty);
534
public static void SetTabBarForegroundColor(BindableObject obj,
Color
value) => obj.SetValue(TabBarForegroundColorProperty, value);
541
public static
Color
GetTabBarTitleColor(BindableObject obj) => (
Color
)obj.GetValue(TabBarTitleColorProperty);
549
public static void SetTabBarTitleColor(BindableObject obj,
Color
value) => obj.SetValue(TabBarTitleColorProperty, value);
556
public static
Color
GetTabBarUnselectedColor(BindableObject obj) => (
Color
)obj.GetValue(TabBarUnselectedColorProperty);
564
public static void SetTabBarUnselectedColor(BindableObject obj,
Color
value) => obj.SetValue(TabBarUnselectedColorProperty, value);
571
public static
Color
GetTitleColor(BindableObject obj) => (
Color
)obj.GetValue(TitleColorProperty);
578
public static void SetTitleColor(BindableObject obj,
Color
value) => obj.SetValue(TitleColorProperty, value);
585
public static
Color
GetUnselectedColor(BindableObject obj) => (
Color
)obj.GetValue(UnselectedColorProperty);
592
public static void SetUnselectedColor(BindableObject obj,
Color
value) => obj.SetValue(UnselectedColorProperty, value);
733
static
Color
DefaultBackgroundColor => null;
734
static readonly
Color
DefaultForegroundColor = null;
735
static readonly
Color
DefaultTitleColor = null;
1086
BindableProperty.Create(nameof(FlyoutBackgroundColor), typeof(
Color
), typeof(Shell), null, BindingMode.OneTime);
1338
public
Color
FlyoutBackgroundColor
1340
get => (
Color
)GetValue(FlyoutBackgroundColorProperty);
Shell\ShellAppearance.cs (20)
38
Color
[] _colorArray = new
Color
[s_ingestArray.Length];
43
public
Color
BackgroundColor => _colorArray[0];
46
public
Color
DisabledColor => _colorArray[1];
49
public
Color
ForegroundColor => _colorArray[2];
52
public
Color
TabBarBackgroundColor => _colorArray[3];
55
public
Color
TabBarDisabledColor => _colorArray[4];
58
public
Color
TabBarForegroundColor => _colorArray[5];
61
public
Color
TabBarTitleColor => _colorArray[6];
64
public
Color
TabBarUnselectedColor => _colorArray[7];
67
public
Color
TitleColor => _colorArray[8];
70
public
Color
UnselectedColor => _colorArray[9];
77
Color
IShellAppearanceElement.EffectiveTabBarBackgroundColor =>
80
Color
IShellAppearanceElement.EffectiveTabBarDisabledColor =>
83
Color
IShellAppearanceElement.EffectiveTabBarForegroundColor =>
86
Color
IShellAppearanceElement.EffectiveTabBarTitleColor =>
89
Color
IShellAppearanceElement.EffectiveTabBarUnselectedColor =>
109
if (!EqualityComparer<
Color
>.Default.Equals(_colorArray[i], appearance._colorArray[i]))
133
hashCode = hashCode * -1521134295 + EqualityComparer<
Color
>.Default.GetHashCode(_colorArray[i]);
149
var dataSet = pivot.GetValues<
Color
>(s_ingestArray);
Slider\Slider.cs (9)
39
public static readonly BindableProperty MinimumTrackColorProperty = BindableProperty.Create(nameof(MinimumTrackColor), typeof(
Color
), typeof(Slider), null);
42
public static readonly BindableProperty MaximumTrackColorProperty = BindableProperty.Create(nameof(MaximumTrackColor), typeof(
Color
), typeof(Slider), null);
45
public static readonly BindableProperty ThumbColorProperty = BindableProperty.Create(nameof(ThumbColor), typeof(
Color
), typeof(Slider), null);
84
public
Color
MinimumTrackColor
86
get { return (
Color
)GetValue(MinimumTrackColorProperty); }
91
public
Color
MaximumTrackColor
93
get { return (
Color
)GetValue(MaximumTrackColorProperty); }
98
public
Color
ThumbColor
100
get { return (
Color
)GetValue(ThumbColorProperty); }
SolidColorBrush.cs (4)
18
public SolidColorBrush(
Color
color)
35
nameof(Color), typeof(
Color
), typeof(SolidColorBrush), null);
38
public virtual
Color
Color
40
get => (
Color
)GetValue(ColorProperty);
Span.cs (8)
39
= BindableProperty.Create(nameof(BackgroundColor), typeof(
Color
), typeof(Span), default(
Color
), defaultBindingMode: BindingMode.OneWay);
42
public
Color
BackgroundColor
44
get { return (
Color
)GetValue(BackgroundColorProperty); }
52
public
Color
TextColor
54
get { return (
Color
)GetValue(TextElement.TextColorProperty); }
168
void ITextElement.OnTextColorPropertyChanged(
Color
oldValue,
Color
newValue)
SwipeView\SwipeItem.cs (3)
12
public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(
Color
), typeof(SwipeItem), null);
18
public
Color
BackgroundColor
20
get { return (
Color
)GetValue(BackgroundColorProperty); }
Switch\Switch.cs (7)
26
public static readonly BindableProperty OnColorProperty = BindableProperty.Create(nameof(OnColor), typeof(
Color
), typeof(Switch), null,
33
public static readonly BindableProperty ThumbColorProperty = BindableProperty.Create(nameof(ThumbColor), typeof(
Color
), typeof(Switch), null);
36
public
Color
OnColor
38
get { return (
Color
)GetValue(OnColorProperty); }
43
public
Color
ThumbColor
45
get { return (
Color
)GetValue(ThumbColorProperty); }
90
Color
ISwitch.TrackColor
TabbedPage\TabbedPage.cs (12)
21
public static readonly BindableProperty UnselectedTabColorProperty = BindableProperty.Create(nameof(UnselectedTabColor), typeof(
Color
), typeof(TabbedPage), default(
Color
));
24
public static readonly BindableProperty SelectedTabColorProperty = BindableProperty.Create(nameof(SelectedTabColor), typeof(
Color
), typeof(TabbedPage), default(
Color
));
29
public
Color
BarBackgroundColor
31
get => (
Color
)GetValue(BarElement.BarBackgroundColorProperty);
43
public
Color
BarTextColor
45
get => (
Color
)GetValue(BarElement.BarTextColorProperty);
50
public
Color
UnselectedTabColor
52
get => (
Color
)GetValue(UnselectedTabColorProperty);
56
public
Color
SelectedTabColor
58
get => (
Color
)GetValue(SelectedTabColorProperty);
TableView\TableModel.cs (1)
52
public virtual
Color
GetSectionTextColor(int section)
TableView\TableSectionBase.cs (3)
13
public static readonly BindableProperty TextColorProperty = BindableProperty.Create(nameof(TextColor), typeof(
Color
), typeof(TableSectionBase), null);
41
public
Color
TextColor
43
get { return (
Color
)GetValue(TextColorProperty); }
TableView\TableView.cs (1)
227
public override
Color
GetSectionTextColor(int section)
TextElement.cs (3)
12
BindableProperty.Create(nameof(ITextElement.TextColor), typeof(
Color
), typeof(ITextElement), null,
24
((ITextElement)bindable).OnTextColorPropertyChanged((
Color
)oldValue, (
Color
)newValue);
TimePicker\TimePicker.cs (4)
57
public
Color
TextColor
59
get { return (
Color
)GetValue(TextElement.TextColorProperty); }
144
void ITextElement.OnTextColorPropertyChanged(
Color
oldValue,
Color
newValue)
TitleBar\TitleBar.cs (3)
72
typeof(
Color
), typeof(TitleBar));
230
public
Color
ForegroundColor
232
get { return (
Color
)GetValue(ForegroundColorProperty); }
Toolbar\Toolbar.cs (4)
15
Color
_iconColor;
16
Color
_barTextColor;
40
public virtual
Color
BarTextColor { get => _barTextColor; set => SetProperty(ref _barTextColor, value); }
41
public virtual
Color
IconColor { get => _iconColor; set => SetProperty(ref _iconColor, value); }
VisualElement\VisualElement.cs (4)
276
public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(
Color
), typeof(VisualElement), null);
546
/// Gets or sets the <see cref="
Color
"/> which will fill the background of an element. This is a bindable property.
549
public
Color
BackgroundColor
551
get { return (
Color
)GetValue(BackgroundColorProperty); }
Microsoft.Maui.Controls.Build.Tasks (3)
CompiledConverters\ColorTypeConverter.cs (3)
25
var
color =
Color
.FromArgb(value);
75
throw new BuildException(BuildExceptionCode.Conversion, node, null, value, typeof(
Color
));
Microsoft.Maui.Controls.Compatibility (61)
iOS\Cells\CellRenderer.cs (1)
83
var
defaultBgColor = cell.On<PlatformConfiguration.iOS>().DefaultBackgroundColor();
iOS\Cells\EntryCellRenderer.cs (1)
15
static readonly
Color
DefaultTextColor = Maui.Platform.ColorExtensions.LabelColor.ToColor();
iOS\Cells\TextCellRenderer.cs (2)
13
readonly
Color
DefaultDetailColor = Maui.Platform.ColorExtensions.SecondaryLabelColor.ToColor();
14
readonly
Color
DefaultTextColor = Maui.Platform.ColorExtensions.LabelColor.ToColor();
iOS\Extensions\CompatibilityColorExtensions.cs (4)
26
public static UIColor ToUIColor(this
Color
color)
32
public static UIColor ToUIColor(this
Color
color,
Color
defaultColor)
36
public static UIColor ToUIColor(this
Color
color, UIColor defaultColor)
iOS\Forms.cs (1)
152
Application.AccentColor =
Color
.FromRgba(50, 79, 133, 255);
iOS\Renderers\BoxRenderer.cs (2)
86
protected override void SetBackgroundColor(
Color
color)
91
var
elementColor = Element.Color;
iOS\Renderers\DatePickerRenderer.cs (1)
252
var
textColor = Element.TextColor;
iOS\Renderers\EditorRenderer.cs (1)
96
Color
placeholderColor = Element.PlaceholderColor;
iOS\Renderers\EntryRenderer.cs (6)
42
readonly
Color
_defaultPlaceholderColor = Maui.Platform.ColorExtensions.SeventyPercentGrey.ToColor();
277
var
textColor = Element.TextColor;
355
var
targetColor = Element.PlaceholderColor;
359
var
color = targetColor == null || !Element.IsEnabled ? _defaultPlaceholderColor : targetColor;
365
var
color = targetColor ?? _defaultPlaceholderColor;
524
var
color = Element.OnThisPlatform().GetCursorColor();
iOS\Renderers\FormsCheckBox.cs (2)
18
Color
_tintColor;
82
public
Color
CheckBoxTintColor
iOS\Renderers\ImageRenderer.cs (2)
236
readonly
Color
_defaultColor = Maui.Platform.ColorExtensions.LabelColor.ToColor();
254
var
iconcolor = fontsource.Color ?? _defaultColor;
iOS\Renderers\IndicatorViewRenderer.cs (2)
217
var
color = Element.IndicatorColor;
226
var
color = Element.SelectedIndicatorColor;
iOS\Renderers\LabelRenderer.cs (3)
324
protected override void SetBackgroundColor(
Color
color)
587
var
textColor = (
Color
)Element.GetValue(Label.TextColorProperty);
iOS\Renderers\ListViewRenderer.cs (3)
138
var
backgroundColor = solidColorBrush.Color;
747
var
color = Element.SeparatorColor;
780
var
color = Element.RefreshControlColor;
iOS\Renderers\NavigationRenderer.cs (5)
666
var
color = Element.BackgroundColor ?? Maui.Platform.ColorExtensions.BackgroundColor.ToColor();
672
var
barBackgroundColor = NavPage.BarBackgroundColor;
713
var
barTextColor = NavPage.BarTextColor;
756
var
iconColor = Current != null ? NavigationPage.GetIconColor(Current) : null;
767
var
barTextColor = NavPage.BarTextColor;
iOS\Renderers\PickerRenderer.cs (5)
218
readonly
Color
_defaultPlaceholderColor = ColorExtensions.PlaceholderColor.ToColor();
226
var
targetColor = Element.TitleColor;
230
var
color = targetColor == null || !Element.IsEnabled ? _defaultPlaceholderColor : targetColor;
236
var
color = targetColor ?? _defaultPlaceholderColor;
304
var
textColor = Element.TextColor;
iOS\Renderers\ProgressBarRenderer.cs (1)
52
protected override void SetBackgroundColor(
Color
color)
iOS\Renderers\RefreshViewRenderer.cs (1)
94
protected override void SetBackgroundColor(
Color
color)
iOS\Renderers\SearchBarRenderer.cs (5)
150
protected override void SetBackgroundColor(
Color
color)
329
var
targetColor = Element.PlaceholderColor;
336
var
color = Element.IsEnabled && targetColor != null
377
var
targetColor = Element.TextColor;
381
var
color = Element.IsEnabled && targetColor != null ? targetColor : _defaultTextColor.ToColor();
iOS\Renderers\SwipeViewRenderer.cs (5)
166
protected override void SetBackgroundColor(
Color
color)
611
var
textColor = GetSwipeItemColor(formsSwipeItem.BackgroundColor);
675
Color
GetSwipeItemColor(
Color
backgroundColor)
703
var
tintColor = GetSwipeItemColor(swipeItem.BackgroundColor);
iOS\Renderers\SwitchRenderer.cs (1)
75
Color
thumbColor = Element.ThumbColor;
iOS\Renderers\TabbedRenderer.cs (2)
353
var
barBackgroundColor = Tabbed.BarBackgroundColor;
387
var
barTextColor = Tabbed.BarTextColor;
iOS\Renderers\TableViewModelRenderer.cs (1)
71
var
sectionHeaderTextColor = View.Model.GetSectionTextColor((int)section);
iOS\Renderers\TimePickerRenderer.cs (1)
197
var
textColor = Element.TextColor;
iOS\Shapes\ShapeRenderer.cs (1)
552
Color
color = brush.GradientStops[index].Color;
iOS\ViewRenderer.cs (1)
209
protected override void SetBackgroundColor(
Color
color)
iOS\VisualElementRenderer.cs (1)
381
protected virtual void SetBackgroundColor(
Color
color)
Microsoft.Maui.Controls.Maps (10)
Circle.cs (3)
29
typeof(
Color
),
54
public
Color
FillColor
56
get => (
Color
)GetValue(FillColorProperty);
MapElement.cs (3)
18
typeof(
Color
),
32
public
Color
StrokeColor
34
get => (
Color
)GetValue(StrokeColorProperty);
Polygon.cs (4)
16
typeof(
Color
),
18
default(
Color
));
23
public
Color
FillColor
25
get => (
Color
)GetValue(FillColorProperty);
Microsoft.Maui.Controls.Xaml (1)
MarkupExtensions\FontImageExtension.cs (1)
12
public
Color
Color { get; set; }
Microsoft.Maui.Essentials (2)
Browser\BrowserLaunchOptions.shared.cs (2)
17
public
Color
? PreferredToolbarColor { get; set; }
23
public
Color
? PreferredControlColor { get; set; }
Microsoft.Maui.Graphics (375)
AbstractCanvas.cs (4)
66
public abstract
Color
FillColor { set; }
67
public abstract
Color
FontColor { set; }
100
public abstract
Color
StrokeColor { set; }
229
public abstract void SetShadow(SizeF offset, float blur,
Color
color);
CanvasDefaults.cs (1)
5
public static readonly
Color
DefaultShadowColor = new Color(0f, 0f, 0f, .5f);
CanvasExtensions.cs (1)
352
Color
foregroundColor)
Color.cs (45)
104
if (obj is
Color
other)
141
public static
Color
FromHex(string colorAsArgbHex) => FromArgb(colorAsArgbHex);
151
public
Color
WithAlpha(float alpha)
159
public
Color
MultiplyAlpha(float multiplyBy)
206
public
Color
AddLuminosity(float delta)
214
public
Color
WithLuminosity(float luminosity)
226
public
Color
WithSaturation(float saturation)
238
public
Color
WithHue(float hue)
244
public
Color
GetComplementary()
254
return
Color
.FromHsla(h, s, l);
257
public static
Color
FromHsva(float h, float s, float v, float a)
284
public static
Color
FromUint(uint argb)
289
public static
Color
FromInt(int argb)
294
public static
Color
FromRgb(byte red, byte green, byte blue)
299
public static
Color
FromRgba(byte red, byte green, byte blue, byte alpha)
304
public static
Color
FromRgb(int red, int green, int blue)
309
public static
Color
FromRgba(int red, int green, int blue, int alpha)
314
public static
Color
FromRgb(float red, float green, float blue)
316
return
Color
.FromRgba(red, green, blue, 1);
319
public static
Color
FromRgb(double red, double green, double blue)
321
return
Color
.FromRgba(red, green, blue, 1);
324
public static
Color
FromRgba(float r, float g, float b, float a)
329
public static
Color
FromRgba(double r, double g, double b, double a)
334
public static
Color
FromRgba(string colorAsHex) => FromRgba(colorAsHex != null ? colorAsHex.AsSpan() : default);
336
static
Color
FromRgba(ReadOnlySpan<char> colorAsHex)
384
public static
Color
FromArgb(string colorAsHex) => FromArgb(colorAsHex != null ? colorAsHex.AsSpan() : default);
386
static
Color
FromArgb(ReadOnlySpan<char> colorAsHex)
448
public static
Color
FromHsla(float h, float s, float l, float a = 1)
455
public static
Color
FromHsla(double h, double s, double l, double a = 1)
462
public static
Color
FromHsv(float h, float s, float v)
467
public static
Color
FromHsva(int h, int s, int v, int a)
472
public static
Color
FromHsv(int h, int s, int v)
578
public static
Color
Parse(string value)
580
if (TryParse(value, out
var
c) && c != default)
583
throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(
Color
)}");
586
public static bool TryParse(string value, out
Color
color) => TryParse(value != null ? value.AsSpan() : default, out color);
588
static bool TryParse(ReadOnlySpan<char> value, out
Color
color)
597
color =
Color
.FromArgb(value);
669
color =
Color
.FromHsla(h, s, l, a);
690
color =
Color
.FromHsla(h, s, l);
713
color =
Color
.FromHsva((float)h, (float)s, (float)v, (float)a);
734
color =
Color
.FromHsv((float)h, (float)s, (float)v);
738
var
namedColor = GetNamedColor(value);
751
static
Color
GetNamedColor(ReadOnlySpan<char> value)
1038
public static implicit operator
Color
(Vector4 color) => new Color(color);
Colors.cs (289)
9
public static readonly
Color
AliceBlue =
Color
.FromUint(0xFFF0F8FF);
11
public static readonly
Color
AntiqueWhite =
Color
.FromUint(0xFFFAEBD7);
13
public static readonly
Color
Aqua =
Color
.FromUint(0xFF00FFFF);
15
public static readonly
Color
Aquamarine =
Color
.FromUint(0xFF7FFFD4);
17
public static readonly
Color
Azure =
Color
.FromUint(0xFFF0FFFF);
19
public static readonly
Color
Beige =
Color
.FromUint(0xFFF5F5DC);
21
public static readonly
Color
Bisque =
Color
.FromUint(0xFFFFE4C4);
23
public static readonly
Color
Black =
Color
.FromUint(0xFF000000);
25
public static readonly
Color
BlanchedAlmond =
Color
.FromUint(0xFFFFEBCD);
27
public static readonly
Color
Blue =
Color
.FromUint(0xFF0000FF);
29
public static readonly
Color
BlueViolet =
Color
.FromUint(0xFF8A2BE2);
31
public static readonly
Color
Brown =
Color
.FromUint(0xFFA52A2A);
33
public static readonly
Color
BurlyWood =
Color
.FromUint(0xFFDEB887);
35
public static readonly
Color
CadetBlue =
Color
.FromUint(0xFF5F9EA0);
37
public static readonly
Color
Chartreuse =
Color
.FromUint(0xFF7FFF00);
39
public static readonly
Color
Chocolate =
Color
.FromUint(0xFFD2691E);
41
public static readonly
Color
Coral =
Color
.FromUint(0xFFFF7F50);
43
public static readonly
Color
CornflowerBlue =
Color
.FromUint(0xFF6495ED);
45
public static readonly
Color
Cornsilk =
Color
.FromUint(0xFFFFF8DC);
47
public static readonly
Color
Crimson =
Color
.FromUint(0xFFDC143C);
49
public static readonly
Color
Cyan =
Color
.FromUint(0xFF00FFFF);
51
public static readonly
Color
DarkBlue =
Color
.FromUint(0xFF00008B);
53
public static readonly
Color
DarkCyan =
Color
.FromUint(0xFF008B8B);
55
public static readonly
Color
DarkGoldenrod =
Color
.FromUint(0xFFB8860B);
57
public static readonly
Color
DarkGray =
Color
.FromUint(0xFFA9A9A9);
59
public static readonly
Color
DarkGreen =
Color
.FromUint(0xFF006400);
61
public static readonly
Color
DarkGrey = DarkGray;
63
public static readonly
Color
DarkKhaki =
Color
.FromUint(0xFFBDB76B);
65
public static readonly
Color
DarkMagenta =
Color
.FromUint(0xFF8B008B);
67
public static readonly
Color
DarkOliveGreen =
Color
.FromUint(0xFF556B2F);
69
public static readonly
Color
DarkOrange =
Color
.FromUint(0xFFFF8C00);
71
public static readonly
Color
DarkOrchid =
Color
.FromUint(0xFF9932CC);
73
public static readonly
Color
DarkRed =
Color
.FromUint(0xFF8B0000);
75
public static readonly
Color
DarkSalmon =
Color
.FromUint(0xFFE9967A);
77
public static readonly
Color
DarkSeaGreen =
Color
.FromUint(0xFF8FBC8F);
79
public static readonly
Color
DarkSlateBlue =
Color
.FromUint(0xFF483D8B);
81
public static readonly
Color
DarkSlateGray =
Color
.FromUint(0xFF2F4F4F);
83
public static readonly
Color
DarkSlateGrey = DarkSlateGray;
85
public static readonly
Color
DarkTurquoise =
Color
.FromUint(0xFF00CED1);
87
public static readonly
Color
DarkViolet =
Color
.FromUint(0xFF9400D3);
89
public static readonly
Color
DeepPink =
Color
.FromUint(0xFFFF1493);
91
public static readonly
Color
DeepSkyBlue =
Color
.FromUint(0xFF00BFFF);
93
public static readonly
Color
DimGray =
Color
.FromUint(0xFF696969);
95
public static readonly
Color
DimGrey = DimGray;
97
public static readonly
Color
DodgerBlue =
Color
.FromUint(0xFF1E90FF);
99
public static readonly
Color
Firebrick =
Color
.FromUint(0xFFB22222);
101
public static readonly
Color
FloralWhite =
Color
.FromUint(0xFFFFFAF0);
103
public static readonly
Color
ForestGreen =
Color
.FromUint(0xFF228B22);
105
public static readonly
Color
Fuchsia =
Color
.FromUint(0xFFFF00FF);
107
public static readonly
Color
Gainsboro =
Color
.FromUint(0xFFDCDCDC);
109
public static readonly
Color
GhostWhite =
Color
.FromUint(0xFFF8F8FF);
111
public static readonly
Color
Gold =
Color
.FromUint(0xFFFFD700);
113
public static readonly
Color
Goldenrod =
Color
.FromUint(0xFFDAA520);
115
public static readonly
Color
Gray =
Color
.FromUint(0xFF808080);
117
public static readonly
Color
Green =
Color
.FromUint(0xFF008000);
119
public static readonly
Color
GreenYellow =
Color
.FromUint(0xFFADFF2F);
121
public static readonly
Color
Grey = Gray;
123
public static readonly
Color
Honeydew =
Color
.FromUint(0xFFF0FFF0);
125
public static readonly
Color
HotPink =
Color
.FromUint(0xFFFF69B4);
127
public static readonly
Color
IndianRed =
Color
.FromUint(0xFFCD5C5C);
129
public static readonly
Color
Indigo =
Color
.FromUint(0xFF4B0082);
131
public static readonly
Color
Ivory =
Color
.FromUint(0xFFFFFFF0);
133
public static readonly
Color
Khaki =
Color
.FromUint(0xFFF0E68C);
135
public static readonly
Color
Lavender =
Color
.FromUint(0xFFE6E6FA);
137
public static readonly
Color
LavenderBlush =
Color
.FromUint(0xFFFFF0F5);
139
public static readonly
Color
LawnGreen =
Color
.FromUint(0xFF7CFC00);
141
public static readonly
Color
LemonChiffon =
Color
.FromUint(0xFFFFFACD);
143
public static readonly
Color
LightBlue =
Color
.FromUint(0xFFADD8E6);
145
public static readonly
Color
LightCoral =
Color
.FromUint(0xFFF08080);
147
public static readonly
Color
LightCyan =
Color
.FromUint(0xFFE0FFFF);
149
public static readonly
Color
LightGoldenrodYellow =
Color
.FromUint(0xFFFAFAD2);
151
public static readonly
Color
LightGray =
Color
.FromUint(0xFFD3D3D3);
153
public static readonly
Color
LightGreen =
Color
.FromUint(0xFF90EE90);
155
public static readonly
Color
LightGrey = LightGray;
157
public static readonly
Color
LightPink =
Color
.FromUint(0xFFFFB6C1);
159
public static readonly
Color
LightSalmon =
Color
.FromUint(0xFFFFA07A);
161
public static readonly
Color
LightSeaGreen =
Color
.FromUint(0xFF20B2AA);
163
public static readonly
Color
LightSkyBlue =
Color
.FromUint(0xFF87CEFA);
165
public static readonly
Color
LightSlateGray =
Color
.FromUint(0xFF778899);
167
public static readonly
Color
LightSlateGrey = LightSlateGray;
169
public static readonly
Color
LightSteelBlue =
Color
.FromUint(0xFFB0C4DE);
171
public static readonly
Color
LightYellow =
Color
.FromUint(0xFFFFFFE0);
173
public static readonly
Color
Lime =
Color
.FromUint(0xFF00FF00);
175
public static readonly
Color
LimeGreen =
Color
.FromUint(0xFF32CD32);
177
public static readonly
Color
Linen =
Color
.FromUint(0xFFFAF0E6);
179
public static readonly
Color
Magenta =
Color
.FromUint(0xFFFF00FF);
181
public static readonly
Color
Maroon =
Color
.FromUint(0xFF800000);
183
public static readonly
Color
MediumAquamarine =
Color
.FromUint(0xFF66CDAA);
185
public static readonly
Color
MediumBlue =
Color
.FromUint(0xFF0000CD);
187
public static readonly
Color
MediumOrchid =
Color
.FromUint(0xFFBA55D3);
189
public static readonly
Color
MediumPurple =
Color
.FromUint(0xFF9370D8);
191
public static readonly
Color
MediumSeaGreen =
Color
.FromUint(0xFF3CB371);
193
public static readonly
Color
MediumSlateBlue =
Color
.FromUint(0xFF7B68EE);
195
public static readonly
Color
MediumSpringGreen =
Color
.FromUint(0xFF00FA9A);
197
public static readonly
Color
MediumTurquoise =
Color
.FromUint(0xFF48D1CC);
199
public static readonly
Color
MediumVioletRed =
Color
.FromUint(0xFFC71585);
201
public static readonly
Color
MidnightBlue =
Color
.FromUint(0xFF191970);
203
public static readonly
Color
MintCream =
Color
.FromUint(0xFFF5FFFA);
205
public static readonly
Color
MistyRose =
Color
.FromUint(0xFFFFE4E1);
207
public static readonly
Color
Moccasin =
Color
.FromUint(0xFFFFE4B5);
209
public static readonly
Color
NavajoWhite =
Color
.FromUint(0xFFFFDEAD);
211
public static readonly
Color
Navy =
Color
.FromUint(0xFF000080);
213
public static readonly
Color
OldLace =
Color
.FromUint(0xFFFDF5E6);
215
public static readonly
Color
Olive =
Color
.FromUint(0xFF808000);
217
public static readonly
Color
OliveDrab =
Color
.FromUint(0xFF6B8E23);
219
public static readonly
Color
Orange =
Color
.FromUint(0xFFFFA500);
221
public static readonly
Color
OrangeRed =
Color
.FromUint(0xFFFF4500);
223
public static readonly
Color
Orchid =
Color
.FromUint(0xFFDA70D6);
225
public static readonly
Color
PaleGoldenrod =
Color
.FromUint(0xFFEEE8AA);
227
public static readonly
Color
PaleGreen =
Color
.FromUint(0xFF98FB98);
229
public static readonly
Color
PaleTurquoise =
Color
.FromUint(0xFFAFEEEE);
231
public static readonly
Color
PaleVioletRed =
Color
.FromUint(0xFFD87093);
233
public static readonly
Color
PapayaWhip =
Color
.FromUint(0xFFFFEFD5);
235
public static readonly
Color
PeachPuff =
Color
.FromUint(0xFFFFDAB9);
237
public static readonly
Color
Peru =
Color
.FromUint(0xFFCD853F);
239
public static readonly
Color
Pink =
Color
.FromUint(0xFFFFC0CB);
241
public static readonly
Color
Plum =
Color
.FromUint(0xFFDDA0DD);
243
public static readonly
Color
PowderBlue =
Color
.FromUint(0xFFB0E0E6);
245
public static readonly
Color
Purple =
Color
.FromUint(0xFF800080);
247
public static readonly
Color
Red =
Color
.FromUint(0xFFFF0000);
249
public static readonly
Color
RosyBrown =
Color
.FromUint(0xFFBC8F8F);
251
public static readonly
Color
RoyalBlue =
Color
.FromUint(0xFF4169E1);
253
public static readonly
Color
SaddleBrown =
Color
.FromUint(0xFF8B4513);
255
public static readonly
Color
Salmon =
Color
.FromUint(0xFFFA8072);
257
public static readonly
Color
SandyBrown =
Color
.FromUint(0xFFF4A460);
259
public static readonly
Color
SeaGreen =
Color
.FromUint(0xFF2E8B57);
261
public static readonly
Color
SeaShell =
Color
.FromUint(0xFFFFF5EE);
263
public static readonly
Color
Sienna =
Color
.FromUint(0xFFA0522D);
265
public static readonly
Color
Silver =
Color
.FromUint(0xFFC0C0C0);
267
public static readonly
Color
SkyBlue =
Color
.FromUint(0xFF87CEEB);
269
public static readonly
Color
SlateBlue =
Color
.FromUint(0xFF6A5ACD);
271
public static readonly
Color
SlateGray =
Color
.FromUint(0xFF708090);
273
public static readonly
Color
SlateGrey = SlateGray;
275
public static readonly
Color
Snow =
Color
.FromUint(0xFFFFFAFA);
277
public static readonly
Color
SpringGreen =
Color
.FromUint(0xFF00FF7F);
279
public static readonly
Color
SteelBlue =
Color
.FromUint(0xFF4682B4);
281
public static readonly
Color
Tan =
Color
.FromUint(0xFFD2B48C);
283
public static readonly
Color
Teal =
Color
.FromUint(0xFF008080);
285
public static readonly
Color
Thistle =
Color
.FromUint(0xFFD8BFD8);
287
public static readonly
Color
Tomato =
Color
.FromUint(0xFFFF6347);
289
public static readonly
Color
Transparent =
Color
.FromUint(0x00000000);
291
public static readonly
Color
Turquoise =
Color
.FromUint(0xFF40E0D0);
293
public static readonly
Color
Violet =
Color
.FromUint(0xFFEE82EE);
295
public static readonly
Color
Wheat =
Color
.FromUint(0xFFF5DEB3);
297
public static readonly
Color
White =
Color
.FromUint(0xFFFFFFFF);
299
public static readonly
Color
WhiteSmoke =
Color
.FromUint(0xFFF5F5F5);
301
public static readonly
Color
Yellow =
Color
.FromUint(0xFFFFFF00);
303
public static readonly
Color
YellowGreen =
Color
.FromUint(0xFF9ACD32);
Converters\ColorTypeConverter.cs (3)
15
return (
Color
)vec;
18
return
Color
.Parse(fromValue?.ToString());
23
if (!(value is
Color
color) || color == null)
GradientPaint.cs (9)
40
public
Color
StartColor
50
public
Color
EndColor
125
public void SetGradientStops(float[] offsets,
Color
[] colors)
141
public void AddOffset(float offset,
Color
color)
178
public
Color
GetColorAt(float offset)
235
public
Color
BlendStartAndEndColors()
245
public
Color
BlendStartAndEndColors(
Color
startColor,
Color
endColor, float factor)
ICanvas.cs (5)
27
/// Sets the <see cref="
Color
"/> used to paint an object's outline.
29
public
Color
StrokeColor { set; }
54
public
Color
FillColor { set; }
59
public
Color
FontColor { set; }
321
public void SetShadow(SizeF offset, float blur,
Color
color);
ITextAttributes.cs (1)
11
Color
TextFontColor { get; set; }
Paint.cs (2)
5
public
Color
BackgroundColor { get; set; }
7
public
Color
ForegroundColor { get; set; }
PaintGradientStop.cs (3)
7
private
Color
_color;
10
public PaintGradientStop(float offset,
Color
color)
22
public
Color
Color
PatternExtensions.cs (1)
10
public static Paint AsPaint(this IPattern target,
Color
foregroundColor)
PictureCanvas.cs (4)
52
public
Color
StrokeColor
77
public
Color
FillColor
82
public
Color
FontColor
249
public void SetShadow(SizeF offset, float blur,
Color
color)
ScalingCanvas.cs (4)
44
public
Color
StrokeColor
74
public
Color
FillColor
79
public
Color
FontColor
271
public void SetShadow(SizeF offset, float blur,
Color
color)
SolidPaint.cs (2)
9
public SolidPaint(
Color
color)
14
public
Color
Color { get; set; }
StandardTextAttributes.cs (1)
13
public
Color
TextFontColor { get; set; }
Microsoft.Maui.Graphics.Skia (16)
SKColorExtensions.cs (1)
7
public static SKColor ToColor(this
Color
target, float alpha = 1)
SKGraphicsExtensions.cs (5)
10
public static SKColor AsSKColorMultiplyAlpha(this
Color
target, float alpha)
24
public static int ToArgb(this
Color
target)
35
public static int ToArgb(this
Color
target, float alpha)
46
public static SKColor AsSKColor(this
Color
target)
55
public static
Color
AsColor(this SKColor target)
SkiaCanvas.cs (4)
75
public override
Color
StrokeColor
80
public override
Color
FontColor
95
public override
Color
FillColor
724
Color
color)
SkiaCanvasState.cs (6)
27
private
Color
_strokeColor = Colors.Black;
28
private
Color
_fillColor = Colors.White;
29
private
Color
_fontColor = Colors.Black;
62
public
Color
StrokeColor
68
public
Color
FillColor
78
public
Color
FontColor
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (18)
src\Graphics\src\Graphics\Platforms\Windows\GraphicsExtensions.cs (4)
33
(this
Color
color,
Color
defaultColor, float alpha = 1)
35
var
finalColor = color ?? defaultColor;
56
(this
Color
color, float alpha = 1)
src\Graphics\src\Graphics\Platforms\Windows\PlatformCanvas.cs (4)
88
public override
Color
StrokeColor
108
public override
Color
FillColor
113
public override
Color
FontColor
372
public override void SetShadow(SizeF offset, float blur,
Color
color)
src\Graphics\src\Graphics\Platforms\Windows\PlatformCanvasState.cs (10)
57
private
Color
_sourceFillColor;
60
private
Color
_sourceFontColor;
61
private
Color
_sourceShadowColor;
62
private
Color
_sourceStrokeColor;
202
public
Color
StrokeColor
206
var
finalValue = value ?? Colors.Black;
289
public
Color
FillColor
386
public
Color
FontColor
390
var
finalValue = value ?? Colors.Black;
400
public void SetShadow(SizeF offset, float blur,
Color
color)