Skip to content
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

chore(README): badges now are in the terminal theme #1026

Merged
merged 5 commits into from
Apr 26, 2024

Conversation

TadoTheMiner
Copy link
Contributor

The badges in the readme were all the default theme. Giving them prettier colors that match the terminal gif is better. I've used the colors from the VHS repo.

{
    "name": "Aardvark Blue",
    "black": "#191919",
    "red": "#aa342e",
    "green": "#4b8c0f",
    "yellow": "#dbba00",
    "blue": "#1370d3",
    "magenta": "#c43ac3",
    "cyan": "#008eb0",
    "white": "#bebebe",
    "brightBlack": "#454545",
    "brightRed": "#f05b50",
    "brightGreen": "#95dc55",
    "brightYellow": "#ffe763",
    "brightBlue": "#60a4ec",
    "brightMagenta": "#e26be2",
    "brightCyan": "#60b6cb",
    "brightWhite": "#f7f7f7",
    "background": "#102040",
    "foreground": "#dddddd",
    "cursor": "#007acc",
    "selection": "#bfdbfe",
    "meta": {
      "isDark": true,
      "credits": null
    }
  },

grafik
The dependencies badge couldn't unfortunately be themed

@EdJoPaTo
Copy link
Member

I think passing / failing should still be green / red and not some custom Color. When the successful Color is closer to red it’s harder to see at a glance.

@TadoTheMiner
Copy link
Contributor Author

Now the ci and docs have the default color
grafik

@joshka
Copy link
Member

joshka commented Apr 11, 2024

The left side should probably be the dark grey color (light black), so the badges stand out from the background.

If there's several different shades of the same color (like with the greens / reds), that seems like it would look a bit worse compared to the existing situation where the colors are consistent but not the same as the terminal.

This is a good idea, but I think it might be blocked by constraints.

@orhun
Copy link
Sponsor Member

orhun commented Apr 11, 2024

I like this idea, and I follow it for my projects as well. Color coordinating stuff is nice.

But as other maintainers said, not sure if we can make much customizations due to the fact that some of the colors are the indicator of the status.

I still like the purple though :)

@TadoTheMiner
Copy link
Contributor Author

You're right. The grey looks much like the default one, so we rather keep the background. We can atleast keep the blue and magenta. I think the rust logos should have the red as the failing red for consistency. Also I think it would be better if we had for the badge style because on larger fonts, the dependencies is misrendered.

@TadoTheMiner
Copy link
Contributor Author

Btw is there a reason we don't use &link in the badges?

@joshka
Copy link
Member

joshka commented Apr 11, 2024

You're right. The grey looks much like the default one, so we rather keep the background. We can atleast keep the blue and magenta. I think the rust logos should have the red as the failing red for consistency.

Yeah - the blue and magenta change seems like it would be nice

Also I think it would be better if we had for the badge style because on larger fonts, the dependencies is misrendered.

The badges get rendered in a bit of a constrained area in https://crates.io/crates/ratatui so the current size works better there. I think it might be difficult to find something that works well at all font sizes unfortunately, though perhaps changes "dependencies" to "deps.rs" would work.

Btw is there a reason we don't use &link in the badges?

It's not something I've seen before and had to look it up (https://shields.io/badges):

Specify what clicking on the left/right of a badge should do. Note that this only works when integrating your badge in an <object> HTML tag, but not an <img> tag or a markup language.

These get rendered as img tags, so the &link approach won't work.

@TadoTheMiner
Copy link
Contributor Author

Do you know what red the failing build produces?

@joshka
Copy link
Member

joshka commented Apr 11, 2024

Do you know what red the failing build produces?

No, my code is always perfect and never breaks the build ;P

I jest, but I don't know off the top of my head what the exact color is ;)

@TadoTheMiner
Copy link
Contributor Author

Done!

Copy link
Member

@joshka joshka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@joshka joshka merged commit 5fbb77a into ratatui-org:main Apr 26, 2024
33 checks passed
@TadoTheMiner TadoTheMiner deleted the recolor-badges branch April 26, 2024 05:40
joshka pushed a commit to nowNick/ratatui that referenced this pull request May 24, 2024
The badges in the readme were all the default theme. Giving them
prettier colors that match the terminal gif is better. I've used the
colors from the VHS repo.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants