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

Improved color framework #99

Merged
merged 2 commits into from
Feb 8, 2012
Merged

Improved color framework #99

merged 2 commits into from
Feb 8, 2012

Conversation

berenm
Copy link
Contributor

@berenm berenm commented Feb 7, 2012

Hi,

I wrote some code to make the colors more poweful. The old color variables have been converted using the new function and should contain more or less the same content as before.

There's now some color and echo_color functions that can be called and that will produce ANSI escape codes, by parsing the parameters of the functions.
Functions parameters are parsed until exhausted so they can be put together. For example: $(color red fg bright black bg underline bold) creates some bright red foreground, black background with bold and underline ANSI codes that will be used until $(color reset) (or ${normal}) is found.

It should also be compatible with xterm 256 colors (at least that works on Gnome Terminal, not tested anywhere else).
For example $(color rgb 127 0 0) will (try to) produce half pure red.

I haven't tested anywhere except on my Debian Gnome Terminal, I don't guarantee everything works fine... but feel free to take the code if you want.

@tswicegood
Copy link
Member

Awesome! That file's been in need of some love. I've verified that this works on iTerm2 in Lion.

tswicegood added a commit that referenced this pull request Feb 8, 2012
Improved color framework
@tswicegood tswicegood merged commit 8fc3fdd into Bash-it:master Feb 8, 2012
gaelicWizard added a commit to gaelicWizard/bash-it that referenced this pull request Jan 5, 2022
This reverts Bash-it#99, a metaprogramming adventure in terminal color code escape computation. It was functionally reverted in Bash-it#699; I'm just finishing the job.
gaelicWizard added a commit to gaelicWizard/bash-it that referenced this pull request Jan 5, 2022
This reverts Bash-it#99, a metaprogramming adventure in terminal color code escape computation. It was functionally reverted in Bash-it#699; I'm just finishing the job.
gaelicWizard added a commit to gaelicWizard/bash-it that referenced this pull request Jan 8, 2022
This reverts Bash-it#99, a metaprogramming adventure in terminal color code escape computation. It was functionally reverted in Bash-it#699; I'm just finishing the job.
gaelicWizard added a commit to gaelicWizard/bash-it that referenced this pull request Jan 9, 2022
This reverts Bash-it#99, a metaprogramming adventure in terminal color code escape computation. It was functionally reverted in Bash-it#699; I'm just finishing the job.
gaelicWizard added a commit to gaelicWizard/bash-it that referenced this pull request Jan 9, 2022
This reverts Bash-it#99, a metaprogramming adventure in terminal color code escape computation. It was functionally reverted in Bash-it#699; I'm just finishing the job.
gaelicWizard added a commit to gaelicWizard/bash-it that referenced this pull request Jan 9, 2022
This reverts Bash-it#99, a metaprogramming adventure in terminal color code escape computation. It was functionally reverted in Bash-it#699; I'm just finishing the job.
gaelicWizard added a commit to gaelicWizard/bash-it that referenced this pull request Jan 9, 2022
This reverts Bash-it#99, a metaprogramming adventure in terminal color code escape computation. It was functionally reverted in Bash-it#699; I'm just finishing the job.
gaelicWizard added a commit to gaelicWizard/bash-it that referenced this pull request Jan 9, 2022
This reverts Bash-it#99, a metaprogramming adventure in terminal color code escape computation. It was functionally reverted in Bash-it#699; I'm just finishing the job.
gaelicWizard added a commit to gaelicWizard/bash-it that referenced this pull request Jan 25, 2022
This reverts Bash-it#99, a metaprogramming adventure in terminal color code escape computation. It was functionally reverted in Bash-it#699; I'm just finishing the job.
gaelicWizard added a commit to gaelicWizard/bash-it that referenced this pull request Jan 25, 2022
This reverts Bash-it#99, a metaprogramming adventure in terminal color code escape computation. It was functionally reverted in Bash-it#699; I'm just finishing the job.
gaelicWizard added a commit to gaelicWizard/bash-it that referenced this pull request Jan 26, 2022
This reverts Bash-it#99, a metaprogramming adventure in terminal color code escape computation. It was functionally reverted in Bash-it#699; I'm just finishing the job.
gaelicWizard added a commit to gaelicWizard/bash-it that referenced this pull request Jan 28, 2022
This reverts Bash-it#99, a metaprogramming adventure in terminal color code escape computation. It was functionally reverted in Bash-it#699; I'm just finishing the job.
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

2 participants