From 5e101fce34507830baf3be38c363dae355450e67 Mon Sep 17 00:00:00 2001 From: phreakocious Date: Wed, 30 Sep 2020 22:09:42 -0700 Subject: [PATCH] fix __color_rgb function to properly compare r,g,b as variables and not lettersg --- themes/colors.theme.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/colors.theme.bash b/themes/colors.theme.bash index 53f357e2..ab4d8197 100644 --- a/themes/colors.theme.bash +++ b/themes/colors.theme.bash @@ -109,7 +109,7 @@ function __color_white { function __color_rgb { r=$1 && g=$2 && b=$3 - [[ r == g && g == b ]] && echo $(( $r / 11 + 232 )) && return # gray range above 232 + [[ $r == g && $g == $b ]] && echo $(( $r / 11 + 232 )) && return # gray range above 232 echo "8;5;$(( ($r * 36 + $b * 6 + $g) / 51 + 16 ))" }