mirror of
https://github.com/molovo/color.git
synced 2026-09-10 07:16:26 -04:00
Make sure the color is an integer value
This commit is contained in:
parent
15ec6321c2
commit
d8f91ab5fc
|
|
@ -22,7 +22,7 @@ function color() {
|
|||
magenta|m) echo "\033[${b};35m${@}\033[0;m" ;;
|
||||
cyan|c) echo "\033[${b};36m${@}\033[0;m" ;;
|
||||
white|w) echo "\033[${b};37m${@}\033[0;m" ;;
|
||||
*) echo "\033[${b};38;5;${color}m${@}\033[0;m" ;;
|
||||
*) echo "\033[${b};38;5;$(( ${color} ))m${@}\033[0;m" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue