You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lefthook should support configuring colors in output instead of hardcoding them. Consider ANSI Escape Codes.
Value
The defaults colors are hard too see on light background. For example, here's how they look in Tokyonight Day:
From my perspective, the yellow and the green are impossible to read without significant strain.
Using the basic ANSI escape codes will allow users to configure colors once for their terminal and have them work without requiring special configuration for Lefthook. For example, Kitty allows redefining the basic colors. If Lefthook were to use ANSI escape codes, I wouldn't need to do anything special with Lefthook to make it output readable text, regardless of the theme I use.
Hey! Thank you for the issue. I am going to support adaptive color codes in #482 and add an option to configure color codes from the config file. I hope to release it next week with v1.4.0
⚡ Summary
Lefthook should support configuring colors in output instead of hardcoding them. Consider ANSI Escape Codes.
Value
The defaults colors are hard too see on light background. For example, here's how they look in Tokyonight Day:
From my perspective, the yellow and the green are impossible to read without significant strain.
Using the basic ANSI escape codes will allow users to configure colors once for their terminal and have them work without requiring special configuration for Lefthook. For example, Kitty allows redefining the basic colors. If Lefthook were to use ANSI escape codes, I wouldn't need to do anything special with Lefthook to make it output readable text, regardless of the theme I use.
Behavior and configuration changes
As of now, Lefthook uses hardcoded colors:
lefthook/internal/log/log.go
Lines 15 to 21 in d3efe1f
Lefthook would instead of using these colors, output ANSI escape codes corresponding to its intended colors.
The text was updated successfully, but these errors were encountered: