CommunityToolkit / CommunityToolkit/Maui
[BUG] Snackbar displays incorrect text color on android and iOS app
- Dominant language
- C#
- Stars
- 2.7k
- Forks
- 500
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 7
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Did you read the "Reporting a bug" section on Contributing file?
- [x] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
### Current Behavior
I use MAUI community toolkit Snackbar control to display message. I have set snackbar text color to white but on screen, it shows a shade of red.
**Code sample** -
```
var snackbarOptions = new SnackbarOptions
{
BackgroundColor = Color.FromArgb("#D5092E"),
TextColor = Color.FromArgb("#FFFFFF"),
ActionButtonTextColor = Color.FromArgb("#FFFFFF"),
CornerRadius = new CornerRadius(20),
Font = Microsoft.Maui.Font.SystemFontOfSize(16),
ActionButtonFont = Microsoft.Maui.Font.SystemFontOfSize(16),
CharacterSpacing = 0
};
TimeSpan duration = TimeSpan.FromSeconds(timeoutSeconds);
var snackbar = Snackbar.Make(message, action, actionTitle, duration, snackbarOptions);
await snackbar.Show(default);
```
**Output** -

### Expected Behavior
Snackbar should show the exact color set in the code. In my case, white color.
### Steps To Reproduce
Please use this sample code to show snackbar on either android or ios app.
**Code sample** -
```
var snackbarOptions = new SnackbarOptions
{
BackgroundColor = Color.FromArgb("#D5092E"),
TextColor = Color.FromArgb("#FFFFFF"),
ActionButtonTextColor = Color.FromArgb("#FFFFFF"),
CornerRadius = new CornerRadius(20),
Font = Microsoft.Maui.Font.SystemFontOfSize(16),
ActionButtonFont = Microsoft.Maui.Font.SystemFontOfSize(16),
CharacterSpacing = 0
};
TimeSpan duration = TimeSpan.FromSeconds(timeoutSeconds);
var snackbar = Snackbar.Make(message, action, actionTitle, duration, snackbarOptions);
await snackbar.Show(default);
```
**Output** -

### Link to public reproduction project repository
https://github.com/ravi032/MAUISnackbarBug
### Environment
- .NET MAUI CommunityToolkit: 9.1.0
- OS: Android OS 14, iOS 18
- .NET MAUI:
Installation Source: SDK 8.0.400
Manifest Version: 8.0.82/8.0.100
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.