crayon
package
How many times were you creating a function that printed certain notes, warnings or errors on the screen? Did you have the feeling that your messages were not pretty enough? Now, thanks to the crayon package you can improve the format in which you print your messages, adding color and style. Let’s see some example:
|
|
This package offers the next options:
Styles
- reset
- bold
- blurred
- italic
- underline
- inverse
- hidden
Text Colors
- black
- red
- green
- yellow
- blue
- magenta
- cyan
- white
- silver
Background Colors
- bgBlack
- bgRed
- bgGreen
- bgYellow
- bgBlue
- bgMagenta
- bgCyan
- bgWhite
You can combine the options using the ‘$’ operator:
|
|
Styles can also be nested, and then inner style takes precedence. Try it using the ‘%+%’ operator:
|
|
Finally, you can also define your own styles:
|
|