# editor: Do not correct text contrast on non-opaque editor \(\#37471\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/13de400a2acc809bc4d69e38ee3a166d6d412614)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 13de400a2acc809bc4d69e38ee3a166d6d412614

Requested commit: 13de400a2acc809bc4d69e38ee3a166d6d412614

Commit: 13de400a2acc809bc4d69e38ee3a166d6d412614

Tree: 5aa4d5cbf32ff7774ffdb43dfcf4c28069527df2

Author: Smit Barmase

Committer: GitHub

## Message

```
editor: Do not correct text contrast on non-opaque editor (#37471)

We don’t know the background color behind a non-opaque editor, so we
should skip contrast correction in that case. This prevents
single-editor mode (which is always transparent) from showing weird text
colors when text is selected.

We can’t account for the actual background during contrast correction
because we compute contrast outside gpui, while the actual color
blending happens inside gpui during drawing.

<img width="522" height="145" alt="image"
src="https://github.com/user-attachments/assets/6ee71475-f666-482d-87e6-15cf4c4fceef"
/>

Release Notes:

- Fixed an issue where Command Palette text looked faded when selected.
```

## Parents

- [c3480c3d6f0ff1f313c2a3678e29081c54c2ab96](https://git.cafe/gitcafe/zed/commit/c3480c3d6f0ff1f313c2a3678e29081c54c2ab96?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/13de400a2acc809bc4d69e38ee3a166d6d412614?format=markdown)
