Rainbow is a Nim Library supporting 256-color for console. You can use it to color your output, log or anything you want.
- Description
- Installation
- Documentation
- Examples
- Contributing
- Issue Template
- Pull Requests
- Membership
- License
Rainbow is a Nim Library supporting 256-color for console. You can use it to color your output, log or anything you want.
To install it you must have Nim and Nimble Package Manager installed in your Computer. If you are then type:
$ nimble install rainbow
Rainbow is easy to use. Choose any color you want from here:
and just add rf
in front of the color for foreground or rb
for background color.
First you need to import rainbow in top of your file
import rainbow
echo "This is the output".rfLime
echo "This is the output".rbFuchsia
Or you can compine them:
echo "Let's SEE !!!".rbSkyBlue2.rfSilver
Rainbow supports RGB colors in terminal
Example:
echo "Hello world".fgRGB(0,0,255) # Put "Hello world" in blue
echo "Hello world".bgRGB(0,0,255) # Put "Hello world" background in blue
Values can go from 0 (Black) to 255 (Lightest). Higher values will result in none colored output On windows OS the VirtualTerminalLevel register key need to be set to 1 in HKCU\Console as a D_WORD Use that command to add it permanantly reg add HKCU\Console /v VirtualTerminalLevel /t REG_DWORD /d 00000001
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
You may contribute in several ways like creating new features, fixing bugs, improving documentation and examples.
name: Bug report
about: Create a report to help us improve
title:
labels:
assignees:
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. MACOS]
- Browser [e.g. chrome, safari]
- Version of Software or Programming Language [e.g. Nim 1.0.0]
Additional context Add any other context about the problem here.
name: Feature request
about: Suggest an idea for this project
title:
labels:
assignees:
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like A clear and concise description of what you want to happen.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.
We must be able to understand the design of your change from this description. If we can't get a good idea of what the code will be doing from the description here, the pull request may be closed at the maintainers' discretion. Keep in mind that the maintainer reviewing this PR may not be familiar with or have worked with the code here recently, so please walk us through the concepts.
Explain what other alternates were considered and why the proposed version was selected
What benefits will be realized by the code change?
What are the possible side-effects or negative impacts of the code change?
New members are welcome if they have the same philosophy with the organization.
MIT - Free Software for Everyone.