forked from zed-industries/zed
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gpui: Fix default colors blue, red, green to match in CSS default col…
…ors (zed-industries#20851) Release Notes: - N/A --- This change to let the default colors to 100% match with CSS default colors. And update the methods to as `const`. Here is an example: <img width="338" alt="image" src="https://github.com/user-attachments/assets/dd17b46a-3ad4-4122-8dca-e800644c75b0"> https://codepen.io/huacnlee/pen/ZEgNXJZ But the before version for example blue: `h: 0.6 * 360 = 216`, but we expected `240`, `240 / 360 = 0.666666666`, so the before version are lose the precision. (Here is a test tool: https://hslpicker.com/#0000FF) ## After Update ```bash cargo run -p gpui --example hello_world ``` <img width="612" alt="image" src="https://github.com/user-attachments/assets/97d479d8-9c71-4be3-95e0-09af45fe47e2">
- Loading branch information
Showing
2 changed files
with
34 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters