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

Add AdaptiveFaint, ForceFaint and HasDarkColorScheme #47

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

erikgeiser
Copy link

This PR addresses #44 and #45 by adding the AdaptiveFaint and ForceFaint methods on the Style struct. The differences to the classic Faint method are well documented. It also adds HasDarkColorScheme as the underlying functionality is needed for the faint methods and and example to compare the effects of the three faint methods.

I tried all of the color blend methods provided by go-colorful and found that an RGB blend with a factor of 0.5 produces the best results and is most in line with the terminals I tested.

I had to modify the internals of Style as AdaptiveFaint and ForceFaint are post-processing effects that are tricky to implement with the copy semantics of Style.

Here's an excerpt from the example using iTerm:

image

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

1 participant