# gpui: Fix blending of colors in \`HighlightStyle::highlight\` \(\#37666\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 6441099a67c6c6a16aa4bdef884aa64f5e562cc8

Requested commit: 6441099a67c6c6a16aa4bdef884aa64f5e562cc8

Commit: 6441099a67c6c6a16aa4bdef884aa64f5e562cc8

Tree: b7a53fdade64ad32b0c3f1d5b22dfb4c5b469b87

Author: Finn Evers

Committer: GitHub

## Message

```
gpui: Fix blending of colors in `HighlightStyle::highlight` (#37666)

Whilst looking into adding support for RainbowBrackes, we stumbled upon
this: Whereas for all properties during this blending, we take the value
of `other` if it is set, for the color we actually take `self.color`
instead of `other.color` if `self.color` is at full opacity.
`Hsla::blend` returns the latter color if it is at full opacity, which
seems wrong for this case. Hence, this PR swaps these.

Will not merge before the next release, to ensure that we don't break
something somewhere unexpected.

Release Notes:

- N/A
```

## Parents

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

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