}
palette[1024] = [0, 0, 0, 255];
break;
+ case 'rainbow-squared1':
+ for (let i = 0; i < 34; i++) {
+ let cc = Math.floor(i * 255 / 33);
+ palette[i] = [cc, 0, 0, 255];
+ }
+ for (let i = 0; i < 137; i++) {
+ let cc = Math.floor(i * 255 / 136);
+ palette[34 + i] = [255, cc, 0, 255];
+ }
+ for (let i = 0; i < 307; i++) {
+ let cc = Math.floor(i * 255 / 306);
+ palette[171 + i] = [255 - cc, 255, cc, 255];
+ }
+ for (let i = 0; i < 546; i++) {
+ let cc = Math.floor(i * 255 / 545);
+ palette[478 + i] = [cc, 255 - cc, 255, 255];
+ }
+ palette[1024] = [0, 0, 0, 255];
+ break;
+ case 'rainbow-linear2':
+ for (let i = 0; i < 205; i++) {
+ let cc = Math.floor(i * 255 / 204);
+ palette[i] = [255, cc, 0, 255];
+ palette[204 + i] = [255 - cc, 255, 0, 255];
+ palette[409 + i] = [0, 255, cc, 255];
+ palette[614 + i] = [0, 255 - cc, 255, 255];
+ palette[819 + i] = [cc, 0, 255, 255];
+ }
+ palette[1024] = [0, 0, 0, 255];
+ break;
+ case 'rainbow-squared2':
+ for (let i = 0; i < 19; i++) {
+ let cc = Math.floor(i * 255 / 18);
+ palette[i] = [255, cc, 0, 255];
+ }
+ for (let i = 0; i < 74; i++) {
+ let cc = Math.floor(i * 255 / 73);
+ palette[19 + i] = [255 - cc, 255, 0, 255];
+ }
+ for (let i = 0; i < 168; i++) {
+ let cc = Math.floor(i * 255 / 167);
+ palette[93 + i] = [0, 255, cc, 255];
+ }
+ for (let i = 0; i < 298; i++) {
+ let cc = Math.floor(i * 255 / 297);
+ palette[261 + i] = [0, 255 - cc, 255, 255];
+ }
+ for (let i = 0; i < 465; i++) {
+ let cc = Math.floor(i * 255 / 464);
+ palette[559 + i] = [cc, 0, 255, 255];
+ }
+ palette[1024] = [0, 0, 0, 255];
+ break;
}
-/*
-Select Case palnr
-Case 1 'Standard-Palette (QB-Colors)
+ /*
+ 'Standard-Palette (QB-Colors)
For i = 0 To 1024
xx = CInt(i * 500 / 1024 + 2)
If xx <= 15 Then clr = xx
If xx >= 500 Then clr = 0
palette(i) = QBColor(clr)
Next
-Case 3 'Regenbogen-Palette 1 (qu.)
- For i = 0 To 33
- clr = CInt(i * 255 / 33)
- palette(i) = RGB(clr, 0, 0)
- Next
- For i = 0 To 136
- clr = CInt(i * 255 / 136)
- palette(34 + i) = RGB(255, clr, 0)
- Next
- For i = 0 To 306
- clr = CInt(i * 255 / 306)
- palette(171 + i) = RGB(255 - clr, 255, clr)
- Next
- For i = 0 To 545
- clr = CInt(i * 255 / 545)
- palette(478 + i) = RGB(clr, 255 - clr, 255)
- Next
-Case 4 'Regenbogen-Palette 2 (linear)
- For i = 0 To 204
- clr = CInt(i * 255 / 204)
- palette(i) = RGB(255, clr, 0)
- palette(204 + i) = RGB(255 - clr, 255, 0)
- palette(409 + i) = RGB(0, 255, clr)
- palette(614 + i) = RGB(0, 255 - clr, 255)
- palette(819 + i) = RGB(clr, 0, 255)
- Next
-Case 5 'Regenbogen-Palette 2 (qu.)
- For i = 0 To 18
- clr = CInt(i * 255 / 18)
- palette(i) = RGB(255, clr, 0)
- Next
- For i = 0 To 73
- clr = CInt(i * 255 / 73)
- palette(20 + i) = RGB(255 - clr, 255, 0)
- Next
- For i = 0 To 167
- clr = CInt(i * 255 / 167)
- palette(93 + i) = RGB(0, 255, clr)
- Next
- For i = 0 To 297
- clr = CInt(i * 255 / 297)
- palette(261 + i) = RGB(0, 255 - clr, 255)
- Next
- For i = 0 To 464
- clr = CInt(i * 255 / 464)
- palette(559 + i) = RGB(clr, 0, 255)
- Next
-*/
+ */
return palette;
}