Commit graph

29 commits

Author SHA1 Message Date
Oleksiy Syvokon
eb0f9ddcdc
themes: Implement Bright Black and Bright White colors (#36761)
Before:
<img width="356" height="50" alt="image"
src="https://github.com/user-attachments/assets/c4f4ae53-8820-4f22-b306-2e5062cfe552"
/>

After:
<img width="340" height="41" alt="image"
src="https://github.com/user-attachments/assets/8e69d9dc-5640-4e41-845d-f299fc5954e3"
/>


Release Notes:

- Fixed ANSI Bright Black and Bright White colors
2025-08-22 16:03:47 +00:00
Alejandro Fernández Gómez
9443c930de
Make One Dark's ansi.*magenta colors more magenta-y (#35423)
Tweak the `ansi.*magenta` colours so they are not confused with
`ansi.*red`. This matches how "One Light" behaves, where `ansi.*magenta`
uses the same purple as for keyword.

This change helps distinguish anything that the terminal might use
magenta for from errors, and helps make more readable the output of
certain tools.

For maintainers: The color for `ansi.magenta` is the same as for
`syntax.keyword`. The others are modifications on that colour to taste.
If you have some specific shades that need to be used please tell me, or
feel free to take over the PR.

Before: `jj log` and `difftastic` output

<img width="863" height="592" alt="Screenshot 2025-07-31 at 19 32 11"
src="https://github.com/user-attachments/assets/994b1cbd-ff64-4620-bd51-a5073fd6eb2a"
/>

After:

<img width="862" height="558" alt="Screenshot 2025-07-31 at 19 35 33"
src="https://github.com/user-attachments/assets/49dfb856-6b63-4498-8779-b8624230d6a3"
/>

Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-08-08 22:50:39 +00:00
Peter Tripp
cb50f07d23
One Light Theme: Change constant color (#33166)
Closes: https://github.com/zed-industries/zed/issues/4617
Closes: https://github.com/zed-industries/zed/issues/25709

Changes the One Light syntax highlight for `constant` to be a distinct
from `comment`:

| Before | After |
| - | - |
| <img width="424" alt="Screenshot 2025-06-21 at 11 59 22"
src="https://github.com/user-attachments/assets/8780918f-7701-4780-809a-f95951970c90"
/> | <img width="430" alt="Screenshot 2025-06-21 at 11 59 17"
src="https://github.com/user-attachments/assets/d7efaa16-f95a-4076-a0b2-b1170e2ffe68"
/> |

I picked a color which was present in the palette from the original One
Light theme from Atom.

@failable: Sorry this took so long, does this look ok to you?

Release Notes:

- N/A
2025-06-21 12:43:02 -04:00
Nate Butler
0b7583bae5
Refine styling of merge conflicts (#31012)
- Improved colors
- Blank out diff hunk gutter highlights in conflict regions
- Paint conflict marker highlights all the way to the gutter

Release Notes:

- Improved the highlighting of merge conflict markers in editors.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Co-authored-by: Cole Miller <cole@zed.dev>
2025-06-09 19:03:19 +00:00
chbk
9e5f89dc26
Improve CSS syntax highlighting (#25326)
Release Notes:

  - Improved CSS syntax highlighting

| Zed 0.174.6 | With this PR |
| --- | --- |
| ![css_0 174
6](https://github.com/user-attachments/assets/d069f20e-5f1f-4d03-a010-81ba4b61b3a0)
|
![css_pr](https://github.com/user-attachments/assets/36463ef1-2ead-421d-9825-bd359e7677ab)
|

- `|`: `operator`
- `and`, `or`, `not`, `only`: `operator` -> `keyword.operator`, as
defined in other languages
- `id_name`, `class_name`: `property`/`attribute` -> `selector`, not a
property name. [CSS
reference](https://www.w3.org/TR/selectors-3/#class-html)
- `namespace_name`: `property` -> `namespace`, not a property name
- `property_name`: `constant` -> `property`, like `feature_name` already
defined
- `(keyword_query)`: `property`, similar to `feature_name`. [CSS
reference](https://www.w3.org/TR/mediaqueries-3/#media1)
- `keyword_query`: `constant.builtin`, [CSS
reference](https://www.w3.org/TR/mediaqueries-3/#media0)
- `plain_value`, `keyframes_name`: `constant.builtin`, [CSS
reference](https://www.w3.org/TR/css-values-3/#value-defs)
- `unit`: `type` -> `type.unit`,
[Atom](9e4afce058/grammars/tree-sitter-css.cson (L73))
and [VS
Code](336801752d/extensions/css/syntaxes/css.tmLanguage.json (L1393))
also have a `unit` scope for this. [CSS
reference](https://www.w3.org/TR/css3-values/#dimensions)


```css
@media (keyword_query) and keyword_query {}
@supports (feature_name: plain_value) {}
@namespace namespace_name url("string");
namespace_name|tag_name {}
@keyframes keyframes_name {
  to {
    top: 200unit;
    color: #c01045;
  }
}
tag_name::before,
#id_name:nth-child(even),
.class_name[attribute_name=plain_value] {
  property_name: 2em 1.2em;
  --variable: rgb(250, 0, 0);
  color: var(--variable);
  animation: keyframes_name 5s plain_value;
}
```
2025-06-06 17:14:32 -04:00
Oleksiy Syvokon
8730d317a8
themes: Swap ANSI white with ANSI black (#32175)
Here’s how it looks after the fix:
![colors](https://github.com/user-attachments/assets/11c78ad6-da50-4aad-b133-9be5e3844878).
White is white and black is black, as intended.

In some cases, dimmed colors were poorly defined, so I took
`text.dimmed` values.

Note that white is defined exactly as the background color for light
themes. Similarly, black is the exact background color for dark themes.
I didn’t change this, but many themes intentionally make white and black
slightly different from the background color. This prevents issues where
programs assume, say, a dark background and set the foreground to white,
making text invisible. I'm not sure if we want to adjust these themes to
address this; just noting it here.


Closes #29379 

Release Notes:

- Fixed ANSI black and ANSI white colors in built-in themes
2025-06-05 17:14:39 +00:00
Nate Butler
43ab7fe0e2
theme: Fix incorrect version control keys in One themes (#26606)
While the `.{variants}` of the theme keys _were_ incorrect, they are
actually more consistent with our current theme keys (thanks AI!) So we
will keep theme, and fix the incorrect usages in the one themes and
elsewhere.

Old description:
> 
> This PR fixes an issue where we specified the incorrect theme keys
(thanks AI!) > in the theme schema. The following keys have been changed
to their correct > versions:
> 
> | Before                        | After                   |
> |-------------------------------|-------------------------|
> | version_control.added         | version_control_added   |
> | version_control.deleted       | version_control_deleted |
> | version_control.modified      | version_control_modified|
> | version_control.renamed       | version_control_renamed |
> | version_control.conflict      | version_control_conflict|
> | version_control.ignored       | version_control_ignored |
> 
> Please use the after versions in your themes, as they are correct! 
> 
> We won't be adding secondary keys to fix this automatically as git
only > officially launched today.
> 
> Due to this change, we've also updated the version control keys in the
One > themes to keep the default diff hunks looks from changing.

Closes #26572

Release Notes:

- theme: Fixed an issue where version control colors weren't applying
correctly.
2025-03-12 22:07:04 +00:00
Marshall Bowers
133704a419
Adjust @variable color in One Dark theme (#25468)
This PR adjusts the color used for `@variable`s in One Dark to use the
`editor.foreground` color.

| Language | Before | After |
| -------- |
-----------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------------
|
| Rust | <img width="1410" alt="Screenshot 2025-02-24 at 10 46 04 AM"
src="https://github.com/user-attachments/assets/3e1de7d2-03f6-45cc-87bb-93b86b5b1cb2"
/> | <img width="1410" alt="Screenshot 2025-02-24 at 10 46 15 AM"
src="https://github.com/user-attachments/assets/da6129aa-6886-4655-b305-c283e23bfd1e"
/> |
| Python | <img width="1410" alt="Screenshot 2025-02-24 at 10 46 10 AM"
src="https://github.com/user-attachments/assets/f60833f9-d306-44b6-a0b0-42b447e60498"
/> | <img width="1410" alt="Screenshot 2025-02-24 at 10 46 19 AM"
src="https://github.com/user-attachments/assets/256aa6b3-b798-46e4-9943-f21469e7d8bb"
/> |

Release Notes:

- One Dark theme: Adjusted the color used for `@variable` syntax
highlights.
2025-02-24 16:08:22 +00:00
Marshall Bowers
ad4163b9be
Revert "Add syntax scopes to themes (#25323)" (#25339)
This reverts commit 2f416aebbe.

We shouldn't have merged this yet, as it currently breaks syntax
highlighting for some languages that haven't had their requisite changes
merged yet.

We also need to be aware of the impact this will have on downstream
themes.

@chbk We should bundle any changes to the themes with the specific
language highlights that depend on those changes (and if there are
multiple languages that need the same change then pick one language to
come first and then stack the rest of the changes on top of that).

Release Notes:

- Community: This is a revert of
https://github.com/zed-industries/zed/pull/25323, so remove those notes
from the release notes.
2025-02-21 15:12:12 +00:00
chbk
2f416aebbe
Add syntax scopes to themes (#25323)
Release Notes:

  - Added syntax scopes to themes

Supports:

- [Improve CSS syntax
highlighting](https://github.com/zed-industries/zed/pull/25326)
- [Improve Go syntax
highlighting](https://github.com/zed-industries/zed/pull/25327)
- [Improve Markdown syntax
highlighting](https://github.com/zed-industries/zed/pull/25330)

Changes:

- Adds highlighting rules for the following new scopes, using theme
colors:
    - `heading`
    - `namespace`
    - `selector`
    - `strikethrough`
    - `unit`

- Renames scopes that are no longer used in `zed/crates/languages/src`
or `zed/extensions` to their new names:
    - `punctuation.list_marker` -> `punctuation.markup`
    - `link_text` -> `link`
- `link_uri` -> `link.url`, as defined in the [gitcommit
grammar](dff47a8436/crates/languages/src/gitcommit/highlights.scm (L5))
    - `text.literal` -> `raw`
2025-02-21 09:21:18 -05:00
Cole Miller
8e17b34eff
Color staged and unstaged hunks differently by opacity (#25108)
Release Notes:

- Make staged diff hunks appear as more opaque than unstaged hunks

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
2025-02-19 18:33:21 +00:00
Cole Miller
529c65276e
Revert gutter stripes as indicator of hunk staged status (#25089)
We've decided to go in a different direction on indicating the staged
status of hunks, so go back for now to a world where we don't display
staged and unstaged hunks differently outside the (still gated) project
diff editor.

cc @iamnbutler 

This reverts commit 8c202b3b09.

Release Notes:

- N/A
2025-02-18 13:20:39 -05:00
Danilo Leal
cd108cc5f6
theme: Improve contrast for One Light's read_background token (#25027)
Closes https://github.com/zed-industries/zed/issues/20575

Subtle change, but more pronounced in single characters.

| Before | After |
|--------|--------|
| <img width="700" alt="Screenshot 2025-02-07 at 4 58 16 PM"
src="https://github.com/user-attachments/assets/dc9332e1-6e86-44a9-bb7a-5f195d778127"
/> | <img width="700" alt="Screenshot 2025-02-07 at 4 58 16 PM"
src="https://github.com/user-attachments/assets/d8fd408f-f8ea-4b87-bd20-345ffc24b5b1"
/> |

Release Notes:

- N/A
2025-02-17 16:05:57 -03:00
Nate Butler
8c202b3b09
editor: Update git hunk indicators to show staging status when hunk is expanded (#24818)
- Update git hunk indicators to show staging status when hunk is
expanded
- Updates uses of status colors to the new version control theme colors
- Adds new version control theme colors to included themes

Before:

![CleanShot 2025-02-13 at 14 42
48@2x](https://github.com/user-attachments/assets/ccca147e-0de2-4e69-9cd4-01b010bf06d0)

After:

![CleanShot 2025-02-13 at 14 42
04@2x](https://github.com/user-attachments/assets/1ab49174-bde5-43b2-83c5-d217533df49a)

(Colors here are from before theme colors were added)


Release Notes:

- N/A *or* Added/Fixed/Improved ...

---------

Co-authored-by: cole-miller <m@cole-miller.net>
2025-02-13 20:12:23 +00:00
Libon
d0c4c664b0
Brighten yellow and black terminal colors in One themes (#24420)
Closes https://github.com/zed-industries/zed/issues/24419

I made some fine adjustments to the color of the theme with reference
to' Window Terminal' to make it look good. If there is anything
inappropriate in this revision, please also point it out. :)


![window-terminal-one-light](https://github.com/user-attachments/assets/86c4002f-a5a7-4ab1-81de-e6ed0529fe06)

![window-terminal-one-dark](https://github.com/user-attachments/assets/c57095d7-0131-4978-ae6d-7105639110b5)

Release Notes:
- N/A
2025-02-10 11:03:47 +00:00
Danilo Leal
da1c3d8b40
Add hover_line_number color token (#23279)
This enables having a dedicated color for the line number hover state.
That's relevant because line numbers can now be clicked to jump to
cursor location in multibuffers.

Release Notes:

- N/A

---------

Co-authored-by: João Marcos <marcospb19@hotmail.com>
2025-01-17 09:24:42 -03:00
Danilo Leal
3978937457
Add stray visual refinements (#22125)
In different parts of the app, but all of them can be seen in the
screenshot below:

<img width="800" alt="Screenshot 2024-12-16 at 21 31 51"
src="https://github.com/user-attachments/assets/79c0ad5e-4e4c-469d-93a1-fd4e707d4aaa"
/>

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2024-12-17 09:40:16 -03:00
Peter Tripp
41a973b13f
Publish theme json schema v0.2.0 (#21428)
Fix theme json schema so `./script/import-themes print-schema` works again
Update schema to reflect current structs
([diff](https://gist.github.com/notpeter/26e6d0939985f542e8492458442ac62a/revisions?diff=unified&w=))

https://zed.dev/schema/themes/v0.2.0.json
2024-12-03 12:57:39 -05:00
Nate Butler
f22e56ff42
Improve One theme contrasts (#20304)
Closes #5334
Closes #15521 

Improve contrast across the board in default One themes. 

We are currently building out some theme tools to make improvements to
contrast and tweaking themes in general easier, so these should continue
to improve over time.

**Light**

Before | After

![CleanShot 2024-11-06 at 11 26
02@2x](https://github.com/user-attachments/assets/2e5d5649-4131-4d42-accc-9bbcf34defeb)

**Dark**
Before | After

![CleanShot 2024-11-06 at 11 30
26@2x](https://github.com/user-attachments/assets/78bc5134-6113-48fd-b026-88e427c631a3)

**Note 1**: there are more improvements to be made, but this should deal
with the most egregious issues.

Release Notes:

- Improved contrast in default One themes
2024-11-06 11:56:02 -05:00
Kyle Kelley
c63c2015a6
Revert accidental one theme changes (#17273)
Co-authored-by: Peter Tripp <peter@zed.dev>
2024-09-02 14:48:23 -04:00
Peter Tripp
6b8bdcfe72
Add jsonschema link to bundled themes (#17253) 2024-09-02 08:25:59 -04:00
Mikayla Maki
fe3fe945a9
linux: Indicate when the window is focused (#14266)
fixes #14202

Release Notes:

- Added a representation of the current focus state to Zed's window
style ([#14202](https://github.com/zed-industries/zed/issues/14202))
2024-07-12 14:20:58 -07:00
Ephram
15b8790a2c
Update One Light modified color (#12143)
Release Notes:

- Changed the `modified` color on the one-light color theme to a more
readable value

The current color in the file tree for modified files is basically
unreadable in the default light mode
<img width="238" alt="image"
src="https://github.com/zed-industries/zed/assets/50590465/e553673f-1c24-41d9-b1b9-1dbbb7419d1e">

This change just changes the color to match that of the one-light theme
present in vscode
~~old proposal:
https://github.com/zed-industries/zed/assets/50590465/b4dc4030-bcd8-429a-84b8-2744e213e492~~
new proposal:
<img width="378" alt="image"
src="https://github.com/zed-industries/zed/assets/50590465/41c53019-8cf3-4927-9879-47937388cde8">

This does have a side-effect of changing the modified color on the side
in the editor, but personally I think this change is negligable.
2024-07-10 15:33:35 -04:00
Nate Butler
414cff5c14
One Dark Updates (#13777)
Before | After

![CleanShot 2024-07-03 at 10 25
24@2x](https://github.com/zed-industries/zed/assets/1714999/7b355217-7dcf-416a-8b6f-63a12d3f2ea7)

Release Notes:

- Improved contrast between some items in the One Dark theme.
2024-07-08 18:01:51 -04:00
Marshall Bowers
954c772e29
Use ignored color from theme for items ignored by Git (#10038)
This PR updates the color of the label used for Git-aware items to use
the `ignored` color from the theme when the item is ignored by Git.

The built-in themes have had their `ignored` color updated to match
`text.disabled`, as the existing `ignored` color did not sufficiently
differentiate from non-ignored items.

Fixes #9976.

Release Notes:

- Updated items in the project panel to use the `ignored` color from the
theme when they are ignored by Git
([#9976](https://github.com/zed-industries/zed/issues/9976)).
2024-04-01 11:34:49 -04:00
Philipp Schaffrath
db0eaca2e5
Rename scrollbar_thumb to be consistent with other style properties (#8004)
This small inconsistency was mentioned on the discord. This fixes it.

Release Notes:

- Themes: Renamed `scrollbar_thumb.background` to
`scrollbar.thumb.background` to be consistent with other style
properties.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-02-20 11:26:09 -05:00
Marshall Bowers
47329f4489
Add search.match_background colors to bundled themes (#7385)
This PR populates the `search.match_background` colors in the bundled
themes, using the values from the Zed1 themes.

Release Notes:

- Added theme-specific `search.match_background` colors to built-in
themes.
2024-02-05 11:13:38 -05:00
Marshall Bowers
a2efc8da7a
Add player colors to serialized themes (#6887)
This PR adds player colors to serialized themes.

Release Notes:

- N/A
2024-01-27 13:50:33 -05:00
Marshall Bowers
0fe0683ef4
Add serialized versions of themes (#6885)
This PR adds serialized versions of each of the themes that currently
ship with Zed.

In a future PR we'll be looking to make these the canonical
representations of the built-in themes.

Note that we're intentionally repurposing the `theme_importer` to do
this, so that crate is a bit rough-and-ready at the moment.

Release Notes:

- N/A
2024-01-27 13:35:43 -05:00