emilk / emilk/egui

egui not respecting text color

Open
#2,005 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
30.6k
Forks
2.1k
Avg merge
1d 12h
Merged PRs (30d)
67

Description

**Describe the bug**
When I set the text color to black (#000), the text does not turn black. Instead, it is #585858.

I'm trying to make my text darker so it meets accessibility standards:

https://webaim.org/resources/contrastchecker/?fcolor=585858&bcolor=E6E6E6

But the text isn't getting darker.

Button:
![Example button](https://user-images.githubusercontent.com/605676/188510290-2c0aa8a1-4aad-45f9-9209-c6130cf6d81e.png)

**To Reproduce**
Steps to reproduce the behavior:
1. Set the visuals to the following:
```
let mut visuals = egui::Visuals::light();
visuals.widgets.noninteractive.fg_stroke.color = Color32::BLACK;
visuals.widgets.active.fg_stroke.color = Color32::BLACK;
visuals.widgets.inactive.fg_stroke.color = Color32::BLACK;
visuals.widgets.hovered.fg_stroke.color = Color32::BLACK;
visuals.widgets.open.fg_stroke.color = Color32::BLACK;
ctx.set_visuals(visuals);
```

3. Create a button (or any widget).

**Expected behavior**
The text color should be black, not grey.

**Desktop:**
- OS: Windows 11

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.