Title: Very poor color contrast with dark themes. Potential fixes included. · Issue #2325 · pre-commit/pre-commit · GitHub
Open Graph Title: Very poor color contrast with dark themes. Potential fixes included. · Issue #2325 · pre-commit/pre-commit
X Title: Very poor color contrast with dark themes. Potential fixes included. · Issue #2325 · pre-commit/pre-commit
Description: I recently discovered this project and I love it, it helps me to catch simple issues, keep my commit history cleaner, and avoid wasting time on failed CI runs. Kudos! The one issue I've had is extremely poor contrast with the color highl...
Open Graph Description: I recently discovered this project and I love it, it helps me to catch simple issues, keep my commit history cleaner, and avoid wasting time on failed CI runs. Kudos! The one issue I've had is extr...
X Description: I recently discovered this project and I love it, it helps me to catch simple issues, keep my commit history cleaner, and avoid wasting time on failed CI runs. Kudos! The one issue I've had is ...
Opengraph URL: https://github.com/pre-commit/pre-commit/issues/2325
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Very poor color contrast with dark themes. Potential fixes included.","articleBody":"I recently discovered this project and I love it, it helps me to catch simple issues, keep my commit history cleaner, and avoid wasting time on failed CI runs. Kudos!\r\n\r\nThe one issue I've had is extremely poor contrast with the color highlighting when using a dark color scheme, very similar to #2268. I've seen the answer given in that issue, and I disagree with the assessment that the terminal color scheme is to blame. I'm using a common color scheme (One Dark) that is widely tested in IDEs, terminals, and editors. I use this color scheme system-wide and I have no problems with the output of any other CLI application, or any elements of my window manager. The issue is 100% down to the implementation of highlighting in pre-commit. I suspect this issue is affecting the users of many common terminal dark themes.\r\n\r\n---\r\n### Solutions\r\n\r\nI can propose two ways of fixing this problem, both could be easily implemented as options:\r\n1. Highlight the text foreground, rather than the background.\r\n2. When using background highlighting, the text foreground color should become the terminal background color. This option wouldn't change the branding of the application in any significant way.\r\n\r\nEither of these solutions could be implemented as simple environment variables, or the latter could possibly be done automatically based on the terminal's foreground and background colors.\r\n\r\n---\r\n### Screenshots\r\n \r\n**Default pre-commit highlighting:**\r\n\r\n\r\n**Using only foreground highlighting:**\r\n\r\n\r\n**Using inverse background highlighting:**\r\n\r\n\r\n**Full screenshot of my system:**\r\n\r\n\r\n---\r\n\r\nAs you can see, it is absolutely nothing to do with my color scheme, and by changing the way pre-commit highlights text it is entirely possible to create a visually pleasing result like you see in the rest of my OS.\r\n\r\nI fully understand if you aren't interested in doing the work for this, as it is a fairly trivial issue and it's likely a lot of work to maintain this project already. However, I do hope you would consider having a discussion about the logistics, and accepting a Pull Request to implement some kind of solution for dark theme users.\r\n\r\nThanks for your time.","author":{"url":"https://github.com/ralgar","@type":"Person","name":"ralgar"},"datePublished":"2022-04-03T04:06:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/2325/pre-commit/issues/2325"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:06e22014-5a3c-a94b-a6f6-1b12d96c681a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C54E:189FE3:A9506F:D67D3F:69917F55 |
| html-safe-nonce | 098aa2d79912d044a434dc580c9395f8642daa6b644aa5ef54d8452b9c20c474 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTRFOjE4OUZFMzpBOTUwNkY6RDY3RDNGOjY5OTE3RjU1IiwidmlzaXRvcl9pZCI6IjQ5MzAwNDExOTgxODAxMzg4MzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 35827e28dec467b2872c87b8ad39ebc453dd39d54c220ddd26e894039edba4ad |
| hovercard-subject-tag | issue:1190812089 |
| github-keyboard-shortcuts | repository,issues,commits,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/pre-commit/pre-commit/2325/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f0370de83f5fa8cdad323c89c36b87fd34c3a463969367ff870684db33acf2d5/pre-commit/pre-commit/issues/2325 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f0370de83f5fa8cdad323c89c36b87fd34c3a463969367ff870684db33acf2d5/pre-commit/pre-commit/issues/2325 |
| og:image:alt | I recently discovered this project and I love it, it helps me to catch simple issues, keep my commit history cleaner, and avoid wasting time on failed CI runs. Kudos! The one issue I've had is extr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ralgar |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/pre-commit/pre-commit git https://github.com/pre-commit/pre-commit.git |
| octolytics-dimension-user_id | 6943086 |
| octolytics-dimension-user_login | pre-commit |
| octolytics-dimension-repository_id | 17689377 |
| octolytics-dimension-repository_nwo | pre-commit/pre-commit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 17689377 |
| octolytics-dimension-repository_network_root_nwo | pre-commit/pre-commit |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 848bc6032dcc93a9a7301dcc3f379a72ba13b96e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width