Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

563477 views
1
2
3 The colors in the IntPic package
3
4
The idea in what concerns the colors is the following: the reader is free to
5
choose his colors (taking into account that the latex xcolor package is
6
used), but we try to make users life reasonably easy. He is allowed to
7
choose tones. The default colors used by IntPic are not many, although (from
8
our experience) sufficient for most examples.
9
10
11
3.1 Colors by tones
12
13
The colors are divided by tones.
14
15
 red 
16
gap> IP_ColorsRedTones; #red
17
[ "red", "red!50", "red!20", "red!80!green!50", "red!80!blue!60" ]
18

19
20
 green 
21
gap> IP_ColorsGreenTones; #green
22
[ "green", "green!50", "green!20", "green!80!red!50", "green!80!blue!60" ]
23

24
25
 blue 
26
gap> IP_ColorsBlueTones; #blue
27
[ "blue", "blue!50", "blue!20", "blue!80!red!50", "blue!80!green!60" ]
28

29
30
 cyan 
31
gap> IP_ColorsCompRedTones; # cyan (complement of red)
32
[ "-red", "-red!50", "-red!20", "-red!80!green!50", "-red!80!blue!60" ]
33

34
35
 magenta 
36
gap> IP_ColorsCompGreenTones; # magenta (complement of green)
37
[ "-green", "-green!50", "-green!20", "-green!80!red!50", "-green!80!blue!60" 
38
 ]
39

40
41
 yellow 
42
gap> IP_ColorsCompBlueTones; # yellow (complement of blue)
43
[ "-blue", "-blue!50", "-blue!20", "-blue!80!red!50", "-blue!80!green!60" ]
44

45
46
 dark gray 
47
gap> IP_ColorsDGrayTones; # dark gray
48
[ "black!80", "black!70", "black!60", "black!50", "black!40" ]
49

50
51
 light gray 
52
gap> IP_ColorsLGrayTones; # light gray
53
[ "black!30", "black!25", "black!20", "black!15", "black!10" ]
54

55
56
57
3.2 Lists of colors
58
59
 array of colors by tones 
60
gap> ListsOfIP_Colors;
61
[ [ "red", "red!50", "red!20", "red!80!green!50", "red!80!blue!60" ], 
62
 [ "green", "green!50", "green!20", "green!80!red!50", "green!80!blue!60" ], 
63
 [ "blue", "blue!50", "blue!20", "blue!80!red!50", "blue!80!green!60" ], 
64
 [ "-red", "-red!50", "-red!20", "-red!80!green!50", "-red!80!blue!60" ], 
65
 [ "-green", "-green!50", "-green!20", "-green!80!red!50", 
66
 "-green!80!blue!60" ], 
67
 [ "-blue", "-blue!50", "-blue!20", "-blue!80!red!50", "-blue!80!green!60" ],
68
 [ "black!80", "black!70", "black!60", "black!50", "black!40" ], 
69
 [ "black!30", "black!25", "black!20", "black!15", "black!10" ] ]
70

71
72
 list of colors by tones 
73
gap> IP_Colors;
74
[ "red", "red!50", "red!20", "red!80!green!50", "red!80!blue!60", "green", 
75
 "green!50", "green!20", "green!80!red!50", "green!80!blue!60", "blue", 
76
 "blue!50", "blue!20", "blue!80!red!50", "blue!80!green!60", "-red", 
77
 "-red!50", "-red!20", "-red!80!green!50", "-red!80!blue!60", "-green", 
78
 "-green!50", "-green!20", "-green!80!red!50", "-green!80!blue!60", "-blue", 
79
 "-blue!50", "-blue!20", "-blue!80!red!50", "-blue!80!green!60", "black!80", 
80
 "black!70", "black!60", "black!50", "black!40", "black!30", "black!25", 
81
 "black!20", "black!15", "black!10" ]
82

83
84
85
3.3 The IntPic default list of colors
86
87
The colors are shuffled by concatenating the transposed of the matrix
88
ListsOfIP_Colors. The list obtained is taken as the default list of colors.
89
90
 default list of colors 
91
gap> ShuffledIP_colors;
92
[ "red", "green", "blue", "-red", "-green", "-blue", "black!80", "black!30", 
93
 "red!50", "green!50", "blue!50", "-red!50", "-green!50", "-blue!50", 
94
 "black!70", "black!25", "red!20", "green!20", "blue!20", "-red!20", 
95
 "-green!20", "-blue!20", "black!60", "black!20", "red!80!green!50", 
96
 "green!80!red!50", "blue!80!red!50", "-red!80!green!50", "-green!80!red!50",
97
 "-blue!80!red!50", "black!50", "black!15", "red!80!blue!60", 
98
 "green!80!blue!60", "blue!80!green!60", "-red!80!blue!60", 
99
 "-green!80!blue!60", "-blue!80!green!60", "black!40", "black!10" ]
100

101
102
These are the IntPic default colors. Although the user is free to use other
103
colors, we warn that there is a need of compatibility with the colors used
104
in other packages (the LaTeX xcolor, for instance). To emphasize the
105
integers of some sets by using some of the colors in some list of colors
106
(for instance the default colors) one may use empty lists to force the non
107
usage of the colors whose order in the list of colors is the order of these
108
empty lists in the array of integers to be emphasized.
109
110
 Example 
111
gap> m3 := Filtered([1..40],i->i mod 3=0);
112
[ 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39 ]
113
gap> m5 := Filtered([1..40],i->i mod 5=0);
114
[ 5, 10, 15, 20, 25, 30, 35, 40 ]
115
gap> m7 := Filtered([1..40],i->i mod 7=0);
116
[ 7, 14, 21, 28, 35 ]
117
gap> 
118
gap> arr := [[],[],m3,[],m5,[],m7];;
119
gap> tkz:=IP_TikzArrayOfIntegers([1..40],10,rec(highlights:=arr));;
120

121
122
123
3.4 Functions to deal with colors
124
125
For the moment we only provide one function, which shuffles colors from
126
lists of colors.
127
128
129
3.4-1 Shuffle colors from lists of colors
130
131
ShuffleIP_Colors( mat )  function
132
133
The argument mat is a list of lists of colors of the same length. The output
134
is obtained by concatenating the transposed of mat.
135
136
 Example 
137
gap> ShuffleIP_Colors([IP_ColorsRedTones,IP_ColorsCompBlueTones]);
138
[ "red", "-blue", "red!50", "-blue!50", "red!20", "-blue!20", 
139
 "red!80!green!50", "-blue!80!red!50", "red!80!blue!60", "-blue!80!green!60" 
140
 ]
141

142
143
144