-
Notifications
You must be signed in to change notification settings - Fork 9
/
demo_palettes
executable file
·89 lines (75 loc) · 2.8 KB
/
demo_palettes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/bash
scriptDir=$(dirname -- "$(readlink -f -- "$BASH_SOURCE")")
themesDir="${scriptDir}/themes"
palettesDir="${scriptDir}/palettes"
source $scriptDir'/lib/lib'
detailed=0
for arg in "$@"; do
if [ "$arg" = "--detailed" ]; then
detailed=1
break
fi
done
clear
printf "\033[48;5;4m"
center_string Palettes
no_color
if [ $detailed -eq 1 ]; then
for FILE in $(ls $palettesDir);
do
if [ $FILE != 'README.md' ]
then
printf "\033[3m"
printf "\033[48;5;17m"
center_string $FILE
no_color
echo
source $palettesDir/$FILE
printf "\033[1mMain colors$(no_color)\n\n"
printf "Primary "
printf "$(rgb_bg $palette_primary) $(no_color) "
printf "$(rgb_bg $palette_primary_dark) $(no_color) \n\n"
printf "Secondary "
printf "$(rgb_bg $palette_secondary) $(no_color) "
printf "$(rgb_bg $palette_secondary_dark) $(no_color) \n\n"
printf "Accent "
printf "$(rgb_bg $palette_accent) $(no_color) "
printf "$(rgb_bg $palette_accent_dark) $(no_color) \n\n"
printf "\033[1mGradient$(no_color)\n\n"
printf "$(bg_gradient $palette_gradient_start $palette_gradient_end ' ') $(no_color)"
printf "$(bg_gradient $palette_gradient_start $palette_gradient_end ' ') $(no_color)"
printf "$(bg_gradient $palette_gradient_start $palette_gradient_end ' ') $(no_color)"
printf "$(bg_gradient $palette_gradient_start $palette_gradient_end ' ') $(no_color)"
printf "$(bg_gradient $palette_gradient_start $palette_gradient_end ' ') $(no_color) \n\n"
printf "$(bg_gradient $palette_gradient_start $palette_gradient_end ' ') $(no_color)"
printf "$(bg_gradient $palette_gradient_start $palette_gradient_end ' ') $(no_color)\n\n"
printf "\033[1mVariants$(no_color)\n\n"
printf "$(rgb_bg $palette_variant_1) $(no_color) "
printf "$(rgb_bg $palette_variant_2) $(no_color) "
printf "$(rgb_bg $palette_variant_3) $(no_color) - "
printf "$(rgb_bg $palette_variant_1) $(no_color)"
printf "$(rgb_bg $palette_variant_2) $(no_color)"
printf "$(rgb_bg $palette_variant_3) $(no_color)"
printf '\n\n'
printf "\033[1mText color:$(no_color) $(rgb_fg $palette_text)this is the text color$(no_color) "
no_color
echo
echo
fi
done
else
for FILE in $(ls $palettesDir);
do
if [ $FILE != 'README.md' ]
then
printf "\033[3m"
printf "\033[48;5;17m"
no_color
printf "\n"
source $palettesDir/$FILE
printf "%-10s %s\n" $FILE "$(rgb_bg $palette_primary) $(no_color) $(rgb_bg $palette_secondary) $(no_color) $(bg_gradient $palette_gradient_start $palette_gradient_end ' ')"
printf "$(no_color) "
echo
fi
done
fi