8000 Add Hi* helpers for hi-intensity colors by rhysd · Pull Request #68 · fatih/color · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add Hi* helpers for hi-intensity colors #68

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

Merged
merged 4 commits into from
May 23, 2017
Merged

Conversation

rhysd
Copy link
Contributor
@rhysd rhysd commented May 19, 2017

Hi,

I added Hi*() helpers (like HiRed()) for hi-intensity colors as well as normal colors.

I added them because only 8 of 16 colors have helpers. I feel hi-intensity colors are as popular as normal colors and used in many places. At least, I wanted to use hi-black for making a text not stand out, and hi-white for making a text be noticeable.

@fatih
Copy link
Owner
fatih commented May 22, 2017

Hi @rhysd This looks ok. I think it would be worth adding because it doesn't break anything. However I would like to see a small addition to the packages documentation that goes over this a little bit. Just check the other examples to get a sense.

color.go Outdated
// foreground.
func HiBlueString(format string, a ...interface{}) string { return colorString(format, FgHiBlue, a...) }

// HiHiMagentaString is an convenient helper function to return a string with hi-intensity magenta
Copy link
Owner

Choose a reason for hiding this comment

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

Typo: should be HiMagentaString

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for catching this (I reviewed patch myself before creating PR, but I overlooked this...). I'll fix this today.

@rhysd rhysd force-pushed the hi-colors-helpers branch from 0791eca to 5c451b7 Compare May 23, 2017 08:25
@rhysd
Copy link
Contributor Author
rhysd commented May 23, 2017

I fixed the point with rebasing.

@rhysd
Copy link
Contributor Author
rhysd commented May 23, 2017

However I would like to see a small addition to the packages documentation that goes over this a little bit. Just check the other examples to get a sense.

I tried to revise docs instead of copy-and-paste docs of existing helpers in b4376ec. I'm not sure they are better documents than previous, tho.

@fatih
Copy link
Owner
fatih commented May 23, 2017

@rhysd I meant the examples here: https://github.com/fatih/color/blob/master/doc.go

@rhysd
Copy link
Contributor Author
rhysd commented May 23, 2017

@fatih ah, I see... I'll update it today 😄

@rhysd rhysd force-pushed the hi-colors-helpers branch from b4376ec to 7453f08 Compare May 23, 2017 13:27
@rhysd
Copy link
Contributor Author
rhysd commented May 23, 2017

I added Hi* helpers to example code in doc.

@fatih fatih merged commit 570b54c into fatih:master May 23, 2017
@fatih
Copy link
Owner
fatih commented May 23, 2017

Thanks @rhysd, nice update 👍

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.

2 participants
0