# Fix \`hex_to_hsla\` inside the color crate \(\#9412\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 24e7cfb0d5e5d2efce1dcf2cfb29a2110161ad06

Requested commit: 24e7cfb0d5e5d2efce1dcf2cfb29a2110161ad06

Commit: 24e7cfb0d5e5d2efce1dcf2cfb29a2110161ad06

Tree: e326fc064ded29272b9caf406d816deaad84f1aa

Author: Tobias Decking

Committer: GitHub

## Message

```
Fix `hex_to_hsla` inside the color crate (#9412)

Previously, when `hex_to_hsla` was called with a color string using the
#rgb format, the expansion
did not add alpha values, leading to an incorrect result. This patch
fixes the issue.

In addition to that, parsing has been reworked, and the new function no
longer makes
calls to the global allocator in addition to generation much smaller
code. Parsing should
therefore be a bit more performant.
```

## Parents

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

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