# Enhance color logic for phantom elements to improve visual distinction based on collision status \(\#42710\) · gitcafe/zed

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

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

Visibility: public

Requested revision: b17b903c57462b0b63db7c51ba7e15b635598db9

Requested commit: b17b903c57462b0b63db7c51ba7e15b635598db9

Commit: b17b903c57462b0b63db7c51ba7e15b635598db9

Tree: 0b1ff86d7b376e76f553f905ecb9d0dc02d19a2d

Author: Libon

Committer: GitHub

## Message

```
Enhance color logic for phantom elements to improve visual distinction based on collision status (#42710)

This change modifies the color assignment for phantom elements in the
editor. If a phantom element collides with existing elements, it now
uses a custom color based on the theme's debugger accent with reduced
opacity. Otherwise, it defaults to the hint color.

BEFORE:
![20251114-0939-17
9919633](https://github.com/user-attachments/assets/4ec56f03-4708-4b35-b1ab-abdfd41c763e)

AFTER:
![20251114-0942-38
8596606](https://github.com/user-attachments/assets/6e9a98f1-a34d-4676-9dc6-b3e2b9f967bc)


Release Notes:

- Enhanced color logic for phantom elements to improve visual
distinction based on collision status.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
```

## Parents

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

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