Skip to content

Added four new themes to the themes directory #1571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Gopinath-Mahendiran
Copy link

What does this PR do, and why?

This PR adds four new themes to Zulip Terminal, enhancing user customization options and improving the overall visual experience. The newly introduced themes offer greater flexibility for different user preferences.
Added new theme are

->gruvbox_dark_high_contrast

->gruvbox_dark_low_contrast

-> gruvbox_light_high_contrast

-> gruvbox_light_low_contrast

Outstanding aspect(s)

  • [ ]

External discussion & connections

How did you test this?

  • [x ] Manually - Behavioral changes
  • [ x] Manually - Visual changes
  • [x ] Adapting existing automated tests
  • Adding automated tests for new behavior (or missing tests)
  • [ x] Existing automated tests should already cover this (only a refactor of tested code)

Self-review checklist for each commit

  • It is a minimal coherent idea
  • It has a commit summary following the documented style (title & body)
  • It has a commit summary describing the motivation and reasoning for the change
  • [x ] It individually passes linting and tests
  • It contains test additions for any new behavior
  • It flows clearly from a previous branch commit, and/or prepares for the next commit

Visual changes

gruvbox_dark_low_contrast
Screenshot 2025-04-01 at 7 26 35 PM

gruvbox_dark_high_contrast
Screenshot 2025-04-01 at 7 28 12 PM

gruvbox_light_high_contrast
Screenshot 2025-04-01 at 7 22 00 PM

gruvbox_light_low_contrast
Screenshot 2025-04-01 at 7 23 07 PM

@zulipbot zulipbot added the size: XL [Automatic label added by zulipbot] label Apr 1, 2025
@Gopinath-Mahendiran
Copy link
Author

@neiljp
The previous pull request contained some mistakes, so I have created a new one and requested a review. You can now proceed with recreating it without any issues.

@Gopinath-Mahendiran
Copy link
Author

@neiljp

Differences in Gruvbox Variants:

  1. Background Colors:
    • High Contrast: Uses darker or lighter background colors (e.g., DARK0_HARD or LIGHT0_HARD) to create a more pronounced contrast between foreground and background elements.
    • Low Contrast: Uses softer background colors (e.g., DARK1, LIGHT1) to reduce the contrast and create a more subtle appearance.
  2. Foreground Colors:
    • High Contrast: Employs brighter or bolder foreground colors (e.g., BRIGHT_BLUE, BRIGHT_GREEN) to make text and UI elements stand out more prominently.
    • Low Contrast: Uses muted or faded colors (e.g., FADED_BLUE, FADED_GREEN) to create a more subdued and less visually striking appearance.
  3. Accent Colors:
    • High Contrast: Stronger accent colors (e.g., BRIGHT_RED, BRIGHT_YELLOW) are used for highlights, mentions, or important elements.
    • Low Contrast: Softer accent colors (e.g., NEUTRAL_YELLOW, GRAY_244) are used to blend more seamlessly with the overall theme.
  4. Grayscale Usage:
    • High Contrast: Grayscale colors like LIGHT2 and DARK0_HARD are used for clear separation of UI sections.
    • Low Contrast: Grayscale colors like GRAY_244 and LIGHT4 are used for a more cohesive and less jarring look.



Style Name Gruvbox Dark (Foreground, Background) Gruvbox Dark High Contrast (Foreground, Background)
None (Color.WHITE, Background.COLOR) (Color.LIGHT2, Background.COLOR)
selected (Color.WHITE, Color.DARK_BLUE) (Color.DARK0_HARD, Color.NEUTRAL_BLUE)
msg_selected (Color.WHITE, Color.DARK_BLUE) (Color.DARK0_HARD, Color.NEUTRAL_BLUE)
header (Color.DARK_CYAN, Color.DARK_BLUE) (Color.NEUTRAL_BLUE, Color.BRIGHT_BLUE)
general_narrow (Color.WHITE, Color.DARK_BLUE) (Color.DARK0_HARD, Color.BRIGHT_BLUE)
general_bar (Color.WHITE, Background.COLOR) (Color.LIGHT2, Background.COLOR)
msg_sender (Color.YELLOW__BOLD, Background.COLOR) (Color.NEUTRAL_YELLOW__BOLD, Background.COLOR)
unread (Color.DARK_BLUE, Background.COLOR) (Color.NEUTRAL_PURPLE, Background.COLOR)
user_active (Color.LIGHT_GREEN, Background.COLOR) (Color.BRIGHT_GREEN, Background.COLOR)
user_idle (Color.YELLOW, Background.COLOR) (Color.NEUTRAL_YELLOW, Background.COLOR)
user_offline (Color.WHITE, Background.COLOR) (Color.LIGHT2, Background.COLOR)
user_inactive (Color.WHITE, Background.COLOR) (Color.LIGHT2, Background.COLOR)
user_bot (Color.WHITE, Background.COLOR) (Color.LIGHT2, Background.COLOR)
title (Color.WHITE__BOLD, Background.COLOR) (Color.LIGHT2__BOLD, Background.COLOR)
column_title (Color.WHITE__BOLD, Background.COLOR) (Color.LIGHT2__BOLD, Background.COLOR)
time (Color.LIGHT_BLUE, Background.COLOR) (Color.BRIGHT_BLUE, Background.COLOR)
bar (Color.WHITE, Color.DARK_GRAY) (Color.LIGHT2, Color.GRAY_244)
msg_emoji (Color.LIGHT_MAGENTA, Background.COLOR) (Color.NEUTRAL_PURPLE, Background.COLOR)
reaction (Color.LIGHT_MAGENTA__BOLD, Background.COLOR) (Color.NEUTRAL_PURPLE__BOLD, Background.COLOR)
reaction_mine (Color.BLACK, Color.LIGHT_MAGENTA) (Color.DARK0_HARD, Color.NEUTRAL_PURPLE)
msg_heading (Color.LIGHT_CYAN__BOLD, Color.DARK_MAGENTA) (Color.DARK0_HARD__BOLD, Color.BRIGHT_GREEN)
msg_math (Color.LIGHT_GRAY, Color.DARK_GRAY) (Color.DARK0_HARD, Color.GRAY_244)
msg_mention (Color.LIGHT_RED__BOLD, Background.COLOR) (Color.BRIGHT_RED__BOLD, Background.COLOR)
msg_link (Color.LIGHT_BLUE, Background.COLOR) (Color.BRIGHT_BLUE, Background.COLOR)
msg_link_index (Color.LIGHT_BLUE__BOLD, Background.COLOR) (Color.BRIGHT_BLUE__BOLD, Background.COLOR)
msg_quote (Color.BROWN, Background.COLOR) (Color.NEUTRAL_YELLOW, Background.COLOR)
msg_bold (Color.WHITE__BOLD, Background.COLOR) (Color.LIGHT2__BOLD, Background.COLOR)
msg_time (Color.BLACK, Color.WHITE) (Color.DARK0_HARD, Color.LIGHT2)
footer (Color.BLACK, Color.LIGHT_GRAY) (Color.DARK0_HARD, Color.LIGHT4)
footer_contrast (Color.WHITE, Background.COLOR) (Color.LIGHT2, Background.COLOR)
starred (Color.LIGHT_RED__BOLD, Background.COLOR) (Color.BRIGHT_RED__BOLD, Background.COLOR)
unread_count (Color.YELLOW, Background.COLOR) (Color.NEUTRAL_YELLOW, Background.COLOR)
starred_count (Color.LIGHT_GRAY, Background.COLOR) (Color.LIGHT4, Background.COLOR)
table_head (Color.WHITE__BOLD, Background.COLOR) (Color.LIGHT2__BOLD, Background.COLOR)
filter_results (Color.WHITE, Color.DARK_GREEN) (Color.DARK0_HARD, Color.BRIGHT_GREEN)
edit_topic (Color.WHITE, Color.DARK_GRAY) (Color.DARK0_HARD, Color.GRAY_244)
edit_tag (Color.WHITE, Color.DARK_GRAY) (Color.DARK0_HARD, Color.GRAY_244)
edit_author (Color.YELLOW, Background.COLOR) (Color.NEUTRAL_YELLOW, Background.COLOR)
edit_time (Color.LIGHT_BLUE, Background.COLOR) (Color.BRIGHT_BLUE, Background.COLOR)
current_user (Color.WHITE, Background.COLOR) (Color.LIGHT2, Background.COLOR)
muted (Color.LIGHT_BLUE, Background.COLOR) (Color.BRIGHT_BLUE, Background.COLOR)
popup_border (Color.WHITE, Background.COLOR) (Color.LIGHT2, Background.COLOR)
popup_category (Color.LIGHT_BLUE__BOLD, Background.COLOR) (Color.BRIGHT_BLUE__BOLD, Background.COLOR)
popup_contrast (Color.WHITE, Color.DARK_GRAY) (Color.DARK0_HARD, Color.GRAY_244)
popup_important (Color.LIGHT_RED__BOLD, Background.COLOR) (Color.BRIGHT_RED__BOLD, Background.COLOR)
widget_disabled (Color.DARK_GRAY, Background.COLOR) (Color.GRAY_244, Background.COLOR)
area:help (Color.WHITE, Color.DARK_GREEN) (Color.DARK0_HARD, Color.BRIGHT_GREEN)
area:msg (Color.WHITE, Color.BROWN) (Color.DARK0_HARD, Color.NEUTRAL_PURPLE)
area:stream (Color.WHITE, Color.DARK_CYAN) (Color.DARK0_HARD, Color.BRIGHT_BLUE)
area:error (Color.WHITE, Color.DARK_RED) (Color.DARK0_HARD, Color.BRIGHT_RED)
area:user (Color.WHITE, Color.DARK_BLUE) (Color.DARK0_HARD, Color.BRIGHT_YELLOW)
search_error (Color.LIGHT_RED, Background.COLOR) (Color.BRIGHT_RED, Background.COLOR)
task:success (Color.WHITE, Color.DARK_GREEN) (Color.DARK0_HARD, Color.BRIGHT_GREEN)
task:error (Color.WHITE, Color.DARK_RED) (Color.DARK0_HARD, Color.BRIGHT_RED)
task:warning (Color.WHITE, Color.BROWN) (Color.DARK0_HARD, Color.NEUTRAL_PURPLE)
ui_code (Color.BLACK, Color.WHITE) (Color.DARK0_HARD, Color.LIGHT2)

@Gopinath-Mahendiran
Copy link
Author

This table highlights the differences in foreground and background colors for each style between the two themes. The high-contrast theme uses bolder and more vibrant colors, while the original Gruvbox Dark theme uses more subdued tones.

@neiljp
Copy link
Collaborator

neiljp commented Apr 5, 2025

@Gopinath-Mahendiran I've not looked through every change, since your commits aren't tidied as per the main Zulip commit guidelines, and they're not passing tests - which may be related.

Otherwise, the first thing that looks concerning after manual testing is that background color(s) don't match what I believe are those for any of the hard/medium/soft variants of either gruvbox theme, which I understand to be the DARK[0_HARD|0|0_SOFT] colors, or similarly the LIGHT forms.

Looking at the changes over all your commits, the other confusing large-scale changes are:

  • why gruvbox_dark has got the contents of zt_dark
  • why the zt_dark theme is changed at all (becomes 'custom high contrast' and like a gruvbox)
  • why 'gruvbox_light_high_contrast` is named 'custom high contrast'

The source for the color scheme in vim, linked from the color scheme source, may well be useful to understand when certain colors are used, since it doesn't just show the colors and names, but also how they vary with these 'variants'.

As I said, I've not studied the gruvbox themes except as per the background color. Right now your stated changes are expressed in the PR, but are difficult to translate. With a dynamic approach, with the theme behaving like a template, these variations would be explicit. We could start with the background color variation between variants, since that's extracted already, and then move from there.

The Zulip guide has a lot more information, but to give you an idea of how you might structure your commits, I would suggest commits with minimal changes to individual files for the simplest change you can make to achieve the smallest next step. If they are independent they can be reordered later, and/or combined using an interactive rebase. For example, you might add some 'colors' first, but that could be split up into commits for only-dark, only-light, and maybe multiple for different color additions; later they might all be combined into a commit that relates to just all new colors, or one with the dark changes combined with code that uses those new dark changes for a background, for example.

@neiljp neiljp added the PR awaiting update PR has been reviewed & is awaiting update or response to reviewer feedback label Apr 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR awaiting update PR has been reviewed & is awaiting update or response to reviewer feedback size: XL [Automatic label added by zulipbot]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants