#!/usr/bin/env python3
# rpi_ws281x library Colormapping
# Author: Norbert Karpen
#
# To map specific LED strip locations to a color gradient
# 

import time
from rpi_ws281x import *
import argparse
# import numpy as np
import copy

# LED strip configuration:
LED_COUNT      = 130      # Number of LED pixels.
LED_PIN        = 18      # GPIO pin connected to the pixels (18 uses PWM!).
#LED_PIN        = 10      # GPIO pin connected to the pixels (10 uses SPI /dev/spidev0.0).
LED_FREQ_HZ    = 800000  # LED signal frequency in hertz (usually 800khz)
LED_DMA        = 10      # DMA channel to use for generating signal (try 10)
LED_BRIGHTNESS = 255     # Set to 0 for darkest and 255 for brightest
LED_INVERT     = False   # True to invert the signal (when using NPN transistor level shift)
LED_CHANNEL    = 0       # set to '1' for GPIOs 13, 19, 41, 45 or 53

# Gradient settings
empty_map = [[0, (0, 0, 0)], [1, (0, 0, 0)], [2, (0, 0, 0)], [3, (0, 0, 0)], [4, (0, 0, 0)], [5, (0, 0, 0)], [6, (0, 0, 0)], [7, (0, 0, 0)], [8, (0, 0, 0)], [9, (0, 0, 0)], [10, (0, 0, 0)], [11, (0, 0, 0)], [12, (0, 0, 0)], [13, (0, 0, 0)], [14, (0, 0, 0)], [15, (0, 0, 0)], [16, (0, 0, 0)], [17, (0, 0, 0)], [18, (0, 0, 0)], [19, (0, 0, 0)], [20, (0, 0, 0)], [21, (0, 0, 0)], [22, (0, 0, 0)], [23, (0, 0, 0)], [24, (0, 0, 0)], [25, (0, 0, 0)], [26, (0, 0, 0)], [27, (0, 0, 0)], [28, (0, 0, 0)], [29, (0, 0, 0)], [30, (0, 0, 0)], [31, (0, 0, 0)], [32, (0, 0, 0)], [33, (0, 0, 0)], [34, (0, 0, 0)], [35, (0, 0, 0)], [36, (0, 0, 0)], [37, (0, 0, 0)], [38, (0, 0, 0)], [39, (0, 0, 0)], [40, (0, 0, 0)], [41, (0, 0, 0)], [42, (0, 0, 0)], [43, (0, 0, 0)], [44, (0, 0, 0)], [45, (0, 0, 0)], [46, (0, 0, 0)], [47, (0, 0, 0)], [48, (0, 0, 0)], [49, (0, 0, 0)], [50, (0, 0, 0)], [51, (0, 0, 0)], [52, (0, 0, 0)], [53, (0, 0, 0)], [54, (0, 0, 0)], [55, (0, 0, 0)], [56, (0, 0, 0)], [57, (0, 0, 0)], [58, (0, 0, 0)], [59, (0, 0, 0)], [60, (0, 0, 0)], [61, (0, 0, 0)], [62, (0, 0, 0)], [63, (0, 0, 0)], [64, (0, 0, 0)], [65, (0, 0, 0)], [66, (0, 0, 0)], [67, (0, 0, 0)], [68, (0, 0, 0)], [69, (0, 0, 0)], [70, (0, 0, 0)], [71, (0, 0, 0)], [72, (0, 0, 0)], [73, (0, 0, 0)], [74, (0, 0, 0)], [75, (0, 0, 0)], [76, (0, 0, 0)], [77, (0, 0, 0)], [78, (0, 0, 0)], [79, (0, 0, 0)], [80, (0, 0, 0)], [81, (0, 0, 0)], [82, (0, 0, 0)], [83, (0, 0, 0)], [84, (0, 0, 0)], [85, (0, 0, 0)], [86, (0, 0, 0)], [87, (0, 0, 0)], [88, (0, 0, 0)], [89, (0, 0, 0)], [90, (0, 0, 0)], [91, (0, 0, 0)], [92, (0, 0, 0)], [93, (0, 0, 0)], [94, (0, 0, 0)], [95, (0, 0, 0)], [96, (0, 0, 0)], [97, (0, 0, 0)], [98, (0, 0, 0)], [99, (0, 0, 0)], [100, (0, 0, 0)], [101, (0, 0, 0)], [102, (0, 0, 0)], [103, (0, 0, 0)], [104, (0, 0, 0)], [105, (0, 0, 0)], [106, (0, 0, 0)], [107, (0, 0, 0)], [108, (0, 0, 0)], [109, (0, 0, 0)], [110, (0, 0, 0)], [111, (0, 0, 0)], [112, (0, 0, 0)], [113, (0, 0, 0)], [114, (0, 0, 0)], [115, (0, 0, 0)], [116, (0, 0, 0)], [117, (0, 0, 0)], [118, (0, 0, 0)], [119, (0, 0, 0)], [120, (0, 0, 0)], [121, (0, 0, 0)], [122, (0, 0, 0)], [123, (0, 0, 0)], [124, (0, 0, 0)], [125, (0, 0, 0)], [126, (0, 0, 0)], [127, (0, 0, 0)], [128, (0, 0, 0)], [129, (0, 0, 0)]]
gradient_map_original = [[0, (184, 52, 138)], [1, (185, 53, 139)], [2, (187, 55, 139)], [3, (188, 56, 140)], [4, (191, 60, 140)], [5, (192, 61, 139)], [6, (192, 61, 139)], [7, (194, 63, 139)], [8, (194, 63, 139)], [9, (196, 66, 140)], [10, (196, 65, 141)], [11, (196, 66, 140)], [12, (195, 64, 140)], [13, (193, 62, 140)], [14, (190, 58, 141)], [15, (185, 53, 139)], [16, (177, 46, 139)], [17, (170, 40, 140)], [18, (165, 42, 146)], [19, (162, 47, 151)], [20, (156, 50, 158)], [21, (151, 55, 165)], [22, (147, 59, 171)], [23, (140, 63, 179)], [24, (134, 66, 185)], [25, (127, 69, 189)], [26, (116, 70, 194)], [27, (108, 74, 197)], [28, (103, 74, 200)], [29, (97, 75, 201)], [30, (96, 75, 202)], [31, (92, 75, 203)], [32, (91, 76, 203)], [33, (91, 76, 205)], [34, (89, 77, 205)], [35, (88, 77, 205)], [36, (88, 77, 205)], [37, (87, 78, 207)], [38, (85, 78, 207)], [39, (84, 79, 208)], [40, (81, 78, 207)], [41, (80, 79, 207)], [42, (79, 79, 209)], [43, (76, 81, 211)], [44, (73, 80, 210)], [45, (72, 81, 212)], [46, (71, 81, 213)], [47, (65, 82, 214)], [48, (64, 82, 216)], [49, (60, 83, 215)], [50, (61, 80, 209)], [51, (58, 79, 206)], [52, (57, 75, 199)], [53, (55, 74, 194)], [54, (54, 71, 187)], [55, (53, 69, 182)], [56, (53, 65, 173)], [57, (50, 63, 168)], [58, (49, 61, 163)], [59, (49, 57, 155)], [60, (46, 55, 148)], [61, (54, 73, 191)], [62, (56, 74, 198)], [63, (57, 77, 202)], [64, (59, 80, 208)], [65, (59, 82, 214)], [66, (65, 83, 217)], [67, (65, 82, 214)], [68, (71, 81, 213)], [69, (73, 80, 212)], [70, (79, 79, 209)], [71, (81, 78, 209)], [72, (85, 78, 207)], [73, (89, 77, 205)], [74, (92, 75, 203)], [75, (96, 75, 202)], [76, (97, 75, 201)], [77, (99, 74, 201)], [78, (104, 74, 198)], [79, (105, 73, 198)], [80, (108, 74, 197)], [81, (138, 65, 182)], [82, (137, 66, 184)], [83, (135, 66, 183)], [84, (136, 67, 186)], [85, (133, 68, 186)], [86, (132, 68, 188)], [87, (129, 68, 187)], [88, (128, 69, 189)], [89, (123, 69, 189)], [90, (120, 70, 193)], [91, (115, 71, 192)], [92, (111, 71, 194)], [93, (109, 73, 197)], [94, (104, 74, 198)], [95, (102, 76, 201)], [96, (96, 74, 200)], [97, (95, 76, 202)], [98, (89, 77, 205)], [99, (136, 65, 183)], [100, (139, 66, 183)], [101, (139, 65, 180)], [102, (141, 62, 177)], [103, (144, 61, 175)], [104, (143, 60, 174)], [105, (145, 58, 171)], [106, (146, 58, 170)], [107, (146, 57, 167)], [108, (150, 56, 168)], [109, (151, 55, 165)], [110, (151, 55, 165)], [111, (151, 55, 165)], [112, (152, 54, 163)], [113, (152, 54, 163)], [114, (151, 53, 162)], [115, (167, 42, 146)], [116, (166, 43, 147)], [117, (165, 44, 147)], [118, (165, 44, 147)], [119, (165, 44, 147)], [120, (165, 44, 149)], [121, (164, 45, 149)], [122, (164, 45, 147)], [123, (163, 46, 150)], [124, (162, 47, 151)], [125, (160, 47, 153)], [126, (159, 48, 153)], [127, (157, 50, 156)], [128, (157, 50, 156)], [129, (155, 52, 161)]]
gradient_maps_list = [[[0, (1, 155, 193)], [1, (0, 184, 210)], [2, (0, 218, 227)], [3, (1, 230, 233)], [4, (0, 239, 236)], [5, (0, 237, 243)], [6, (0, 237, 249)], [7, (0, 254, 254)], [8, (1, 255, 253)], [9, (1, 255, 253)], [10, (1, 255, 253)], [11, (1, 255, 253)], [12, (1, 255, 253)], [13, (1, 255, 253)], [14, (1, 255, 253)], [15, (1, 255, 253)], [16, (1, 255, 253)], [17, (0, 255, 251)], [18, (0, 255, 251)], [19, (0, 255, 249)], [20, (0, 254, 243)], [21, (0, 254, 226)], [22, (0, 255, 199)], [23, (0, 255, 171)], [24, (0, 255, 151)], [25, (83, 255, 138)], [26, (187, 255, 134)], [27, (247, 240, 133)], [28, (255, 202, 124)], [29, (255, 160, 116)], [30, (255, 123, 102)], [31, (255, 103, 92)], [32, (255, 89, 81)], [33, (255, 80, 65)], [34, (255, 76, 53)], [35, (255, 77, 31)], [36, (254, 81, 25)], [37, (255, 85, 26)], [38, (255, 89, 29)], [39, (255, 96, 12)], [40, (254, 100, 2)], [41, (255, 102, 6)], [42, (255, 86, 79)], [43, (250, 9, 140)], [44, (255, 0, 194)], [45, (255, 0, 218)], [46, (255, 0, 242)], [47, (255, 0, 252)], [48, (255, 0, 254)], [49, (255, 0, 254)], [50, (255, 0, 254)], [51, (240, 0, 255)], [52, (225, 0, 254)], [53, (221, 0, 254)], [54, (221, 0, 254)], [55, (220, 0, 255)], [56, (220, 0, 254)], [57, (220, 0, 255)], [58, (220, 0, 255)], [59, (220, 0, 254)], [60, (220, 0, 255)], [61, (191, 0, 254)], [62, (191, 0, 254)], [63, (190, 0, 255)], [64, (187, 0, 255)], [65, (179, 0, 254)], [66, (145, 0, 255)], [67, (119, 0, 254)], [68, (194, 0, 255)], [69, (255, 0, 254)], [70, (247, 0, 255)], [71, (234, 0, 255)], [72, (216, 1, 255)], [73, (194, 0, 255)], [74, (177, 0, 255)], [75, (164, 0, 255)], [76, (146, 0, 255)], [77, (142, 1, 255)], [78, (132, 0, 255)], [79, (117, 9, 253)], [80, (0, 158, 188)], [81, (0, 175, 240)], [82, (0, 178, 238)], [83, (0, 178, 229)], [84, (1, 153, 176)], [85, (1, 94, 83)], [86, (5, 27, 15)], [87, (26, 5, 20)], [88, (2, 50, 0)], [89, (1, 95, 81)], [90, (0, 121, 142)], [91, (0, 125, 173)], [92, (28, 114, 201)], [93, (88, 96, 223)], [94, (126, 73, 239)], [95, (152, 57, 249)], [96, (179, 35, 254)], [97, (200, 30, 251)], [98, (195, 36, 253)], [99, (1, 75, 74)], [100, (0, 59, 34)], [101, (20, 37, 1)], [102, (28, 13, 8)], [103, (31, 0, 10)], [104, (25, 11, 10)], [105, (0, 41, 0)], [106, (0, 71, 57)], [107, (0, 99, 114)], [108, (0, 126, 161)], [109, (0, 147, 199)], [110, (1, 160, 225)], [111, (0, 170, 242)], [112, (0, 170, 245)], [113, (0, 172, 241)], [114, (0, 173, 242)], [115, (1, 255, 253)], [116, (1, 255, 253)], [117, (0, 244, 254)], [118, (0, 241, 252)], [119, (0, 248, 250)], [120, (1, 228, 244)], [121, (0, 204, 229)], [122, (0, 176, 215)], [123, (0, 145, 190)], [124, (1, 117, 158)], [125, (0, 93, 123)], [126, (0, 72, 81)], [127, (0, 49, 38)], [128, (2, 30, 7)], [129, (23, 13, 11)]], [[0, (27, 210, 104)], [1, (31, 214, 108)], [2, (33, 216, 112)], [3, (35, 215, 116)], [4, (41, 220, 120)], [5, (43, 221, 123)], [6, (42, 222, 125)], [7, (46, 224, 128)], [8, (46, 226, 129)], [9, (49, 226, 135)], [10, (54, 227, 137)], [11, (49, 226, 135)], [12, (47, 226, 132)], [13, (45, 223, 127)], [14, (40, 218, 120)], [15, (30, 213, 107)], [16, (18, 205, 90)], [17, (2, 192, 66)], [18, (15, 186, 58)], [19, (29, 176, 44)], [20, (41, 169, 30)], [21, (74, 179, 37)], [22, (97, 187, 40)], [23, (122, 199, 45)], [24, (143, 209, 49)], [25, (163, 214, 51)], [26, (178, 220, 50)], [27, (195, 224, 54)], [28, (208, 231, 55)], [29, (215, 232, 55)], [30, (221, 234, 56)], [31, (224, 235, 53)], [32, (227, 237, 54)], [33, (231, 239, 55)], [34, (230, 238, 56)], [35, (233, 238, 57)], [36, (234, 237, 58)], [37, (238, 242, 57)], [38, (237, 241, 56)], [39, (241, 243, 56)], [40, (244, 243, 57)], [41, (249, 243, 57)], [42, (248, 243, 55)], [43, (250, 236, 51)], [44, (253, 238, 51)], [45, (253, 232, 45)], [46, (255, 226, 42)], [47, (255, 220, 40)], [48, (255, 214, 40)], [49, (254, 206, 34)], [50, (255, 210, 28)], [51, (251, 206, 27)], [52, (245, 198, 24)], [53, (241, 188, 24)], [54, (237, 181, 26)], [55, (229, 175, 23)], [56, (222, 167, 25)], [57, (218, 162, 27)], [58, (212, 153, 27)], [59, (206, 147, 31)], [60, (198, 138, 28)], [61, (238, 182, 23)], [62, (241, 188, 22)], [63, (249, 197, 25)], [64, (255, 204, 25)], [65, (255, 205, 32)], [66, (253, 211, 37)], [67, (254, 219, 39)], [68, (255, 228, 43)], [69, (255, 238, 47)], [70, (249, 244, 56)], [71, (245, 244, 56)], [72, (239, 241, 56)], [73, (233, 237, 56)], [74, (225, 237, 53)], [75, (220, 233, 55)], [76, (217, 235, 55)], [77, (212, 233, 54)], [78, (205, 227, 54)], [79, (203, 227, 51)], [80, (200, 229, 53)], [81, (131, 202, 46)], [82, (135, 205, 47)], [83, (138, 205, 47)], [84, (142, 208, 48)], [85, (143, 209, 47)], [86, (149, 209, 49)], [87, (153, 211, 47)], [88, (158, 213, 49)], [89, (166, 214, 50)], [90, (176, 219, 51)], [91, (181, 218, 52)], [92, (190, 222, 51)], [93, (198, 226, 54)], [94, (203, 227, 53)], [95, (211, 232, 53)], [96, (215, 233, 53)], [97, (221, 234, 56)], [98, (230, 238, 57)], [99, (137, 204, 46)], [100, (130, 204, 45)], [101, (125, 199, 44)], [102, (116, 195, 41)], [103, (107, 193, 40)], [104, (104, 188, 40)], [105, (99, 189, 40)], [106, (91, 187, 36)], [107, (90, 181, 41)], [108, (79, 181, 35)], [109, (76, 181, 37)], [110, (75, 180, 35)], [111, (73, 178, 36)], [112, (68, 177, 36)], [113, (67, 176, 33)], [114, (66, 175, 34)], [115, (11, 186, 59)], [116, (14, 185, 55)], [117, (17, 184, 55)], [118, (16, 183, 52)], [119, (18, 181, 52)], [120, (18, 181, 52)], [121, (17, 180, 51)], [122, (22, 181, 52)], [123, (25, 181, 48)], [124, (27, 176, 46)], [125, (30, 175, 36)], [126, (31, 171, 36)], [127, (38, 170, 32)], [128, (39, 167, 31)], [129, (50, 171, 32)]], [[0, (149, 225, 2)], [1, (156, 229, 2)], [2, (166, 232, 2)], [3, (175, 235, 0)], [4, (181, 238, 1)], [5, (189, 239, 0)], [6, (194, 243, 1)], [7, (200, 246, 0)], [8, (206, 248, 0)], [9, (213, 249, 1)], [10, (216, 251, 1)], [11, (220, 253, 0)], [12, (220, 253, 0)], [13, (220, 253, 0)], [14, (221, 254, 1)], [15, (221, 254, 1)], [16, (221, 254, 1)], [17, (220, 253, 0)], [18, (219, 251, 0)], [19, (214, 251, 0)], [20, (207, 247, 0)], [21, (199, 244, 1)], [22, (187, 240, 0)], [23, (176, 236, 1)], [24, (163, 231, 0)], [25, (149, 225, 2)], [26, (134, 219, 2)], [27, (118, 212, 2)], [28, (104, 207, 2)], [29, (89, 201, 3)], [30, (74, 195, 4)], [31, (62, 191, 3)], [32, (51, 185, 4)], [33, (39, 180, 5)], [34, (29, 175, 6)], [35, (19, 170, 5)], [36, (12, 166, 6)], [37, (4, 162, 7)], [38, (0, 157, 6)], [39, (0, 152, 8)], [40, (0, 145, 10)], [41, (0, 139, 12)], [42, (0, 133, 14)], [43, (0, 127, 16)], [44, (0, 121, 18)], [45, (0, 115, 20)], [46, (0, 110, 23)], [47, (0, 104, 25)], [48, (0, 99, 27)], [49, (0, 95, 29)], [50, (1, 92, 31)], [51, (0, 91, 30)], [52, (0, 95, 31)], [53, (1, 98, 29)], [54, (0, 102, 26)], [55, (0, 108, 23)], [56, (0, 115, 22)], [57, (0, 121, 20)], [58, (0, 128, 15)], [59, (0, 138, 13)], [60, (0, 144, 10)], [61, (1, 124, 18)], [62, (0, 117, 20)], [63, (0, 112, 22)], [64, (1, 105, 26)], [65, (0, 101, 27)], [66, (0, 97, 28)], [67, (0, 95, 29)], [68, (0, 95, 31)], [69, (0, 96, 29)], [70, (0, 99, 27)], [71, (0, 102, 26)], [72, (0, 108, 23)], [73, (0, 113, 21)], [74, (0, 118, 21)], [75, (0, 123, 17)], [76, (1, 129, 16)], [77, (0, 135, 14)], [78, (0, 141, 11)], [79, (0, 146, 9)], [80, (0, 152, 8)], [81, (45, 182, 4)], [82, (35, 177, 5)], [83, (26, 173, 5)], [84, (18, 169, 6)], [85, (11, 165, 5)], [86, (5, 163, 8)], [87, (1, 160, 8)], [88, (0, 154, 8)], [89, (0, 148, 10)], [90, (0, 141, 11)], [91, (1, 137, 13)], [92, (0, 130, 16)], [93, (0, 126, 18)], [94, (0, 121, 18)], [95, (0, 117, 20)], [96, (0, 114, 19)], [97, (0, 112, 22)], [98, (0, 110, 23)], [99, (0, 153, 9)], [100, (0, 157, 8)], [101, (3, 160, 7)], [102, (8, 164, 5)], [103, (15, 167, 6)], [104, (21, 170, 6)], [105, (29, 175, 6)], [106, (38, 179, 4)], [107, (48, 183, 3)], [108, (58, 188, 4)], [109, (67, 192, 4)], [110, (74, 195, 4)], [111, (86, 199, 3)], [112, (92, 203, 2)], [113, (103, 208, 2)], [114, (112, 212, 2)], [115, (176, 236, 1)], [116, (165, 233, 2)], [117, (158, 229, 1)], [118, (150, 225, 2)], [119, (142, 222, 1)], [120, (134, 219, 2)], [121, (126, 217, 2)], [122, (118, 212, 1)], [123, (107, 209, 3)], [124, (97, 204, 2)], [125, (87, 200, 4)], [126, (77, 197, 4)], [127, (68, 193, 3)], [128, (59, 189, 3)], [129, (50, 185, 4)]], [[0, (225, 22, 86)], [1, (222, 19, 83)], [2, (220, 15, 80)], [3, (219, 13, 77)], [4, (218, 12, 76)], [5, (217, 11, 75)], [6, (219, 11, 73)], [7, (219, 11, 73)], [8, (219, 10, 75)], [9, (220, 11, 76)], [10, (219, 13, 77)], [11, (220, 14, 78)], [12, (221, 15, 79)], [13, (222, 17, 82)], [14, (223, 18, 83)], [15, (222, 19, 83)], [16, (222, 19, 83)], [17, (222, 19, 83)], [18, (223, 18, 83)], [19, (223, 20, 86)], [20, (224, 21, 85)], [21, (224, 24, 89)], [22, (223, 27, 93)], [23, (225, 30, 98)], [24, (224, 35, 103)], [25, (224, 39, 107)], [26, (224, 43, 112)], [27, (224, 47, 119)], [28, (225, 51, 123)], [29, (224, 52, 124)], [30, (225, 55, 128)], [31, (224, 57, 129)], [32, (225, 58, 130)], [33, (224, 58, 130)], [34, (224, 60, 133)], [35, (224, 62, 137)], [36, (224, 63, 139)], [37, (224, 66, 141)], [38, (224, 67, 144)], [39, (223, 71, 148)], [40, (225, 74, 153)], [41, (224, 77, 157)], [42, (224, 81, 161)], [43, (223, 84, 165)], [44, (224, 87, 169)], [45, (223, 89, 174)], [46, (216, 92, 178)], [47, (208, 96, 182)], [48, (195, 99, 188)], [49, (185, 102, 194)], [50, (171, 104, 199)], [51, (158, 108, 205)], [52, (142, 110, 209)], [53, (126, 114, 216)], [54, (109, 116, 220)], [55, (94, 118, 226)], [56, (77, 120, 232)], [57, (61, 123, 236)], [58, (45, 125, 240)], [59, (28, 127, 244)], [60, (18, 128, 249)], [61, (63, 123, 237)], [62, (78, 120, 232)], [63, (94, 118, 226)], [64, (111, 116, 220)], [65, (126, 114, 216)], [66, (145, 110, 210)], [67, (161, 107, 203)], [68, (172, 105, 198)], [69, (186, 101, 192)], [70, (198, 98, 188)], [71, (209, 95, 182)], [72, (219, 91, 176)], [73, (225, 88, 170)], [74, (225, 83, 165)], [75, (226, 80, 161)], [76, (224, 76, 154)], [77, (224, 72, 149)], [78, (224, 67, 144)], [79, (223, 63, 137)], [80, (225, 59, 133)], [81, (225, 26, 93)], [82, (224, 31, 98)], [83, (224, 35, 103)], [84, (224, 39, 107)], [85, (225, 44, 115)], [86, (223, 47, 119)], [87, (224, 52, 124)], [88, (224, 58, 132)], [89, (224, 64, 138)], [90, (224, 69, 147)], [91, (223, 75, 151)], [92, (225, 78, 158)], [93, (224, 82, 164)], [94, (224, 87, 169)], [95, (219, 91, 176)], [96, (212, 94, 182)], [97, (200, 97, 186)], [98, (187, 101, 192)], [99, (225, 70, 146)], [100, (224, 66, 141)], [101, (225, 61, 134)], [102, (225, 55, 126)], [103, (224, 50, 121)], [104, (224, 45, 113)], [105, (224, 39, 107)], [106, (224, 33, 102)], [107, (223, 28, 94)], [108, (224, 24, 89)], [109, (222, 19, 83)], [110, (221, 15, 79)], [111, (220, 11, 76)], [112, (217, 9, 71)], [113, (216, 6, 69)], [114, (214, 4, 65)], [115, (214, 0, 60)], [116, (214, 0, 60)], [117, (214, 0, 60)], [118, (214, 0, 60)], [119, (214, 2, 61)], [120, (216, 4, 65)], [121, (217, 7, 70)], [122, (219, 10, 75)], [123, (220, 14, 78)], [124, (221, 18, 82)], [125, (225, 22, 88)], [126, (223, 27, 93)], [127, (225, 32, 99)], [128, (224, 37, 105)], [129, (223, 42, 111)]], [[0, (202, 5, 76)], [1, (202, 2, 75)], [2, (203, 1, 77)], [3, (203, 1, 77)], [4, (203, 1, 77)], [5, (203, 1, 77)], [6, (203, 1, 77)], [7, (203, 1, 77)], [8, (203, 1, 77)], [9, (203, 1, 77)], [10, (203, 1, 77)], [11, (203, 1, 77)], [12, (203, 1, 77)], [13, (203, 1, 77)], [14, (203, 1, 77)], [15, (203, 1, 77)], [16, (203, 1, 77)], [17, (203, 1, 77)], [18, (203, 1, 77)], [19, (203, 1, 77)], [20, (203, 1, 77)], [21, (203, 3, 76)], [22, (203, 19, 69)], [23, (203, 45, 60)], [24, (203, 73, 49)], [25, (203, 104, 37)], [26, (202, 136, 24)], [27, (200, 170, 12)], [28, (199, 196, 5)], [29, (197, 218, 1)], [30, (193, 236, 0)], [31, (188, 246, 1)], [32, (183, 253, 0)], [33, (178, 255, 1)], [34, (171, 255, 7)], [35, (162, 252, 17)], [36, (153, 247, 26)], [37, (141, 237, 39)], [38, (132, 230, 49)], [39, (120, 220, 62)], [40, (109, 209, 77)], [41, (97, 195, 94)], [42, (86, 183, 106)], [43, (75, 172, 119)], [44, (69, 163, 127)], [45, (60, 154, 138)], [46, (55, 147, 146)], [47, (48, 140, 153)], [48, (43, 135, 160)], [49, (41, 132, 163)], [50, (44, 134, 160)], [51, (49, 142, 150)], [52, (56, 148, 143)], [53, (67, 162, 132)], [54, (80, 176, 113)], [55, (90, 189, 98)], [56, (106, 204, 81)], [57, (123, 220, 63)], [58, (138, 235, 44)], [59, (152, 246, 26)], [60, (166, 254, 12)], [61, (157, 250, 21)], [62, (147, 243, 32)], [63, (138, 235, 44)], [64, (126, 225, 56)], [65, (118, 216, 67)], [66, (111, 208, 77)], [67, (104, 203, 84)], [68, (100, 198, 89)], [69, (97, 195, 92)], [70, (98, 196, 93)], [71, (99, 198, 90)], [72, (102, 201, 84)], [73, (108, 207, 78)], [74, (114, 213, 70)], [75, (118, 217, 65)], [76, (125, 224, 56)], [77, (132, 229, 51)], [78, (140, 236, 40)], [79, (149, 243, 32)], [80, (156, 248, 23)], [81, (196, 217, 0)], [82, (195, 228, 0)], [83, (193, 235, 1)], [84, (191, 242, 1)], [85, (187, 247, 0)], [86, (185, 252, 1)], [87, (183, 254, 0)], [88, (179, 254, 1)], [89, (174, 254, 5)], [90, (167, 255, 11)], [91, (164, 252, 16)], [92, (157, 250, 21)], [93, (152, 246, 25)], [94, (149, 244, 30)], [95, (147, 243, 32)], [96, (147, 243, 32)], [97, (147, 242, 34)], [98, (148, 242, 31)], [99, (189, 245, 0)], [100, (191, 242, 1)], [101, (192, 236, 0)], [102, (194, 230, 0)], [103, (195, 221, 0)], [104, (197, 213, 0)], [105, (200, 204, 5)], [106, (201, 193, 7)], [107, (202, 179, 11)], [108, (202, 169, 14)], [109, (202, 156, 18)], [110, (204, 149, 22)], [111, (203, 135, 26)], [112, (203, 124, 31)], [113, (202, 112, 34)], [114, (203, 101, 37)], [115, (203, 6, 75)], [116, (202, 14, 72)], [117, (202, 20, 68)], [118, (203, 28, 67)], [119, (203, 34, 63)], [120, (203, 45, 60)], [121, (204, 50, 58)], [122, (202, 59, 55)], [123, (203, 73, 49)], [124, (203, 85, 45)], [125, (204, 99, 41)], [126, (203, 109, 35)], [127, (204, 120, 32)], [128, (203, 132, 28)], [129, (204, 144, 24)]], [[0, (151, 13, 255)], [1, (160, 7, 255)], [2, (172, 3, 255)], [3, (178, 1, 255)], [4, (192, 2, 250)], [5, (203, 9, 245)], [6, (212, 18, 237)], [7, (222, 32, 228)], [8, (229, 47, 218)], [9, (236, 64, 208)], [10, (242, 78, 201)], [11, (245, 88, 195)], [12, (248, 98, 188)], [13, (251, 104, 184)], [14, (253, 108, 183)], [15, (252, 108, 180)], [16, (251, 104, 184)], [17, (248, 98, 188)], [18, (244, 86, 196)], [19, (238, 71, 203)], [20, (230, 49, 216)], [21, (218, 26, 233)], [22, (202, 8, 244)], [23, (181, 0, 255)], [24, (166, 5, 255)], [25, (149, 14, 255)], [26, (129, 28, 254)], [27, (107, 48, 254)], [28, (88, 63, 251)], [29, (70, 81, 249)], [30, (52, 96, 245)], [31, (41, 107, 245)], [32, (31, 116, 241)], [33, (22, 126, 241)], [34, (14, 132, 238)], [35, (6, 138, 236)], [36, (2, 143, 235)], [37, (0, 144, 233)], [38, (0, 143, 230)], [39, (0, 143, 229)], [40, (1, 143, 227)], [41, (0, 138, 226)], [42, (3, 132, 223)], [43, (9, 126, 221)], [44, (13, 120, 218)], [45, (20, 112, 215)], [46, (24, 103, 208)], [47, (27, 95, 204)], [48, (28, 82, 190)], [49, (25, 66, 171)], [50, (25, 50, 151)], [51, (20, 32, 130)], [52, (19, 17, 114)], [53, (16, 5, 97)], [54, (15, 0, 91)], [55, (15, 0, 91)], [56, (15, 0, 91)], [57, (15, 0, 91)], [58, (15, 0, 91)], [59, (15, 0, 91)], [60, (15, 0, 91)], [61, (15, 0, 91)], [62, (15, 0, 91)], [63, (15, 0, 91)], [64, (15, 0, 91)], [65, (15, 4, 96)], [66, (18, 17, 111)], [67, (21, 35, 132)], [68, (24, 49, 150)], [69, (27, 66, 171)], [70, (28, 82, 190)], [71, (29, 93, 201)], [72, (25, 104, 209)], [73, (19, 112, 215)], [74, (12, 120, 218)], [75, (8, 127, 221)], [76, (1, 135, 224)], [77, (0, 140, 225)], [78, (1, 143, 227)], [79, (0, 143, 230)], [80, (0, 144, 233)], [81, (52, 96, 245)], [82, (41, 107, 243)], [83, (31, 116, 241)], [84, (20, 125, 240)], [85, (12, 133, 238)], [86, (5, 139, 236)], [87, (2, 143, 235)], [88, (0, 143, 230)], [89, (0, 143, 229)], [90, (1, 143, 227)], [91, (0, 139, 224)], [92, (6, 131, 223)], [93, (11, 124, 220)], [94, (18, 114, 216)], [95, (24, 105, 212)], [96, (26, 97, 205)], [97, (29, 87, 195)], [98, (27, 71, 176)], [99, (1, 143, 227)], [100, (0, 143, 229)], [101, (0, 144, 233)], [102, (2, 143, 235)], [103, (8, 138, 236)], [104, (16, 131, 238)], [105, (26, 121, 241)], [106, (38, 110, 244)], [107, (52, 98, 246)], [108, (64, 86, 249)], [109, (77, 74, 251)], [110, (87, 65, 252)], [111, (101, 52, 255)], [112, (112, 43, 255)], [113, (123, 33, 255)], [114, (134, 25, 254)], [115, (198, 4, 248)], [116, (185, 0, 254)], [117, (176, 0, 255)], [118, (170, 3, 255)], [119, (162, 8, 255)], [120, (152, 13, 255)], [121, (142, 19, 255)], [122, (132, 27, 254)], [123, (117, 38, 254)], [124, (103, 50, 254)], [125, (89, 62, 251)], [126, (75, 75, 249)], [127, (62, 87, 249)], [128, (49, 101, 246)], [129, (35, 112, 244)]], [[0, (255, 113, 179)], [1, (255, 113, 179)], [2, (255, 113, 179)], [3, (255, 113, 179)], [4, (255, 113, 179)], [5, (255, 113, 179)], [6, (255, 113, 179)], [7, (255, 113, 179)], [8, (255, 113, 179)], [9, (255, 113, 179)], [10, (255, 113, 179)], [11, (255, 112, 181)], [12, (255, 112, 181)], [13, (255, 113, 179)], [14, (255, 113, 179)], [15, (255, 113, 179)], [16, (255, 113, 179)], [17, (255, 113, 179)], [18, (255, 113, 179)], [19, (255, 113, 179)], [20, (255, 113, 179)], [21, (255, 112, 181)], [22, (255, 113, 179)], [23, (254, 110, 179)], [24, (250, 102, 186)], [25, (244, 92, 193)], [26, (240, 77, 202)], [27, (232, 62, 213)], [28, (226, 48, 220)], [29, (221, 37, 229)], [30, (215, 27, 238)], [31, (209, 19, 241)], [32, (203, 12, 247)], [33, (196, 7, 249)], [34, (188, 2, 253)], [35, (176, 0, 255)], [36, (164, 3, 255)], [37, (140, 16, 250)], [38, (116, 33, 245)], [39, (83, 59, 233)], [40, (51, 83, 218)], [41, (29, 93, 201)], [42, (18, 88, 186)], [43, (16, 77, 170)], [44, (16, 63, 155)], [45, (14, 49, 139)], [46, (16, 37, 128)], [47, (14, 27, 119)], [48, (15, 22, 113)], [49, (14, 18, 109)], [50, (14, 14, 104)], [51, (15, 10, 102)], [52, (14, 9, 99)], [53, (14, 8, 98)], [54, (15, 4, 96)], [55, (15, 4, 96)], [56, (15, 4, 96)], [57, (16, 3, 95)], [58, (16, 3, 95)], [59, (16, 3, 95)], [60, (15, 2, 94)], [61, (11, 15, 106)], [62, (12, 15, 108)], [63, (11, 14, 107)], [64, (10, 15, 106)], [65, (11, 15, 106)], [66, (11, 15, 106)], [67, (12, 13, 105)], [68, (11, 15, 106)], [69, (12, 13, 105)], [70, (12, 11, 104)], [71, (12, 11, 104)], [72, (14, 9, 101)], [73, (13, 7, 97)], [74, (13, 4, 95)], [75, (16, 3, 93)], [76, (14, 8, 98)], [77, (14, 25, 115)], [78, (15, 54, 145)], [79, (21, 90, 191)], [80, (87, 56, 237)], [81, (255, 113, 179)], [82, (255, 113, 179)], [83, (255, 112, 181)], [84, (255, 113, 179)], [85, (255, 113, 179)], [86, (244, 114, 184)], [87, (147, 133, 212)], [88, (50, 144, 232)], [89, (5, 143, 232)], [90, (1, 130, 222)], [91, (1, 114, 206)], [92, (0, 101, 193)], [93, (0, 89, 181)], [94, (0, 81, 173)], [95, (1, 78, 170)], [96, (0, 73, 167)], [97, (1, 70, 163)], [98, (0, 65, 157)], [99, (38, 143, 234)], [100, (59, 143, 231)], [101, (91, 143, 226)], [102, (133, 136, 215)], [103, (169, 128, 204)], [104, (207, 121, 192)], [105, (235, 116, 184)], [106, (253, 112, 180)], [107, (255, 113, 179)], [108, (255, 113, 179)], [109, (255, 113, 179)], [110, (255, 113, 179)], [111, (255, 112, 181)], [112, (255, 113, 179)], [113, (255, 113, 179)], [114, (255, 113, 179)], [115, (255, 113, 179)], [116, (255, 113, 179)], [117, (255, 113, 179)], [118, (255, 113, 179)], [119, (255, 113, 179)], [120, (255, 113, 179)], [121, (255, 113, 179)], [122, (255, 113, 179)], [123, (255, 113, 179)], [124, (255, 113, 179)], [125, (255, 113, 179)], [126, (252, 113, 181)], [127, (239, 113, 184)], [128, (225, 118, 188)], [129, (207, 121, 192)]], [[0, (255, 194, 113)], [1, (255, 194, 113)], [2, (255, 194, 113)], [3, (255, 194, 113)], [4, (255, 194, 113)], [5, (255, 194, 113)], [6, (255, 194, 113)], [7, (255, 194, 113)], [8, (255, 194, 113)], [9, (255, 194, 113)], [10, (255, 194, 113)], [11, (255, 194, 113)], [12, (255, 194, 113)], [13, (255, 194, 113)], [14, (255, 194, 113)], [15, (255, 194, 113)], [16, (255, 194, 113)], [17, (255, 194, 113)], [18, (255, 194, 113)], [19, (255, 194, 113)], [20, (255, 194, 113)], [21, (255, 194, 113)], [22, (255, 194, 113)], [23, (254, 192, 109)], [24, (255, 174, 98)], [25, (255, 150, 84)], [26, (255, 115, 62)], [27, (254, 76, 40)], [28, (254, 39, 19)], [29, (255, 13, 12)], [30, (255, 8, 24)], [31, (255, 5, 30)], [32, (255, 4, 37)], [33, (254, 2, 43)], [34, (255, 1, 55)], [35, (255, 0, 66)], [36, (255, 3, 80)], [37, (254, 12, 115)], [38, (254, 23, 153)], [39, (255, 38, 213)], [40, (224, 17, 255)], [41, (154, 1, 231)], [42, (129, 0, 204)], [43, (120, 0, 185)], [44, (118, 0, 167)], [45, (119, 0, 154)], [46, (122, 1, 142)], [47, (122, 0, 135)], [48, (125, 0, 128)], [49, (124, 0, 122)], [50, (118, 0, 110)], [51, (112, 0, 100)], [52, (110, 0, 97)], [53, (105, 1, 90)], [54, (102, 0, 84)], [55, (102, 0, 84)], [56, (99, 0, 82)], [57, (97, 0, 79)], [58, (97, 0, 79)], [59, (97, 0, 79)], [60, (94, 0, 74)], [61, (117, 0, 115)], [62, (119, 0, 118)], [63, (117, 0, 115)], [64, (118, 0, 115)], [65, (117, 0, 114)], [66, (117, 0, 114)], [67, (118, 0, 114)], [68, (116, 0, 113)], [69, (116, 0, 111)], [70, (114, 1, 109)], [71, (113, 0, 106)], [72, (110, 0, 99)], [73, (105, 0, 92)], [74, (98, 0, 81)], [75, (97, 0, 77)], [76, (106, 0, 92)], [77, (125, 0, 132)], [78, (118, 1, 160)], [79, (134, 0, 209)], [80, (255, 35, 206)], [81, (255, 194, 113)], [82, (255, 194, 113)], [83, (255, 194, 113)], [84, (255, 194, 113)], [85, (255, 194, 113)], [86, (255, 182, 103)], [87, (255, 88, 217)], [88, (152, 30, 255)], [89, (107, 0, 240)], [90, (104, 0, 223)], [91, (103, 0, 206)], [92, (101, 0, 190)], [93, (101, 0, 182)], [94, (100, 0, 174)], [95, (101, 0, 169)], [96, (99, 1, 166)], [97, (101, 1, 162)], [98, (100, 0, 158)], [99, (140, 17, 255)], [100, (159, 35, 255)], [101, (188, 61, 255)], [102, (252, 90, 253)], [103, (255, 78, 148)], [104, (255, 111, 74)], [105, (255, 169, 94)], [106, (255, 191, 109)], [107, (255, 194, 113)], [108, (255, 194, 113)], [109, (255, 194, 113)], [110, (255, 194, 113)], [111, (255, 194, 113)], [112, (255, 194, 113)], [113, (255, 194, 113)], [114, (255, 194, 113)], [115, (255, 194, 113)], [116, (255, 194, 113)], [117, (255, 194, 113)], [118, (255, 194, 113)], [119, (255, 194, 113)], [120, (255, 194, 113)], [121, (255, 194, 113)], [122, (255, 194, 113)], [123, (255, 194, 113)], [124, (255, 194, 113)], [125, (255, 194, 113)], [126, (253, 191, 108)], [127, (255, 176, 99)], [128, (255, 153, 87)], [129, (253, 114, 73)]], [[0, (63, 30, 85)], [1, (70, 34, 82)], [2, (78, 38, 75)], [3, (80, 33, 67)], [4, (75, 21, 47)], [5, (73, 5, 26)], [6, (73, 0, 19)], [7, (71, 0, 16)], [8, (68, 0, 13)], [9, (68, 0, 13)], [10, (68, 0, 13)], [11, (69, 1, 16)], [12, (72, 0, 22)], [13, (75, 15, 43)], [14, (76, 31, 74)], [15, (68, 27, 85)], [16, (34, 1, 82)], [17, (26, 0, 87)], [18, (21, 0, 91)], [19, (14, 0, 97)], [20, (7, 0, 106)], [21, (0, 1, 119)], [22, (0, 5, 127)], [23, (0, 9, 136)], [24, (0, 21, 138)], [25, (0, 32, 132)], [26, (0, 41, 121)], [27, (0, 45, 95)], [28, (0, 37, 63)], [29, (3, 16, 32)], [30, (10, 0, 27)], [31, (34, 0, 39)], [32, (50, 0, 49)], [33, (63, 0, 55)], [34, (76, 0, 65)], [35, (95, 0, 82)], [36, (116, 1, 105)], [37, (152, 1, 158)], [38, (188, 1, 206)], [39, (228, 1, 254)], [40, (255, 1, 249)], [41, (255, 0, 220)], [42, (255, 0, 220)], [43, (250, 1, 217)], [44, (220, 1, 191)], [45, (209, 0, 180)], [46, (196, 0, 170)], [47, (201, 0, 171)], [48, (196, 0, 86)], [49, (213, 116, 1)], [50, (205, 121, 0)], [51, (198, 122, 0)], [52, (196, 125, 1)], [53, (190, 126, 0)], [54, (186, 129, 0)], [55, (186, 128, 2)], [56, (182, 127, 0)], [57, (181, 131, 0)], [58, (181, 130, 2)], [59, (180, 129, 1)], [60, (178, 131, 1)], [61, (203, 108, 0)], [62, (203, 106, 0)], [63, (201, 104, 1)], [64, (200, 98, 0)], [65, (196, 91, 0)], [66, (195, 78, 0)], [67, (184, 53, 0)], [68, (179, 28, 1)], [69, (178, 3, 0)], [70, (168, 1, 47)], [71, (149, 1, 85)], [72, (112, 0, 72)], [73, (81, 0, 45)], [74, (59, 0, 28)], [75, (47, 0, 18)], [76, (56, 1, 24)], [77, (86, 0, 49)], [78, (115, 0, 77)], [79, (159, 0, 116)], [80, (165, 9, 132)], [81, (75, 28, 80)], [82, (75, 26, 58)], [83, (71, 3, 28)], [84, (68, 0, 15)], [85, (68, 0, 13)], [86, (66, 0, 12)], [87, (150, 1, 85)], [88, (185, 0, 130)], [89, (185, 1, 135)], [90, (185, 1, 135)], [91, (188, 0, 138)], [92, (191, 0, 140)], [93, (202, 0, 150)], [94, (216, 0, 161)], [95, (231, 1, 162)], [96, (244, 0, 152)], [97, (255, 1, 131)], [98, (255, 0, 101)], [99, (254, 12, 208)], [100, (255, 24, 228)], [101, (238, 26, 224)], [102, (217, 37, 206)], [103, (126, 32, 106)], [104, (51, 38, 48)], [105, (64, 38, 67)], [106, (77, 38, 69)], [107, (74, 20, 46)], [108, (73, 0, 17)], [109, (71, 0, 16)], [110, (68, 0, 15)], [111, (68, 0, 15)], [112, (69, 0, 18)], [113, (66, 0, 27)], [114, (75, 25, 62)], [115, (79, 16, 43)], [116, (72, 0, 22)], [117, (71, 0, 16)], [118, (68, 0, 13)], [119, (68, 0, 13)], [120, (71, 0, 16)], [121, (72, 0, 18)], [122, (76, 12, 38)], [123, (75, 22, 50)], [124, (79, 39, 74)], [125, (72, 35, 79)], [126, (57, 29, 78)], [127, (40, 23, 75)], [128, (28, 22, 68)], [129, (33, 30, 61)]]]

speed = 5000   # in %

def illuminate_all_pos(calc_colors):
        for [pos, col] in calc_colors:
                strip.setPixelColor(pos, Color(col[0], col[1], col[2]))
        strip.show()   
        

def shift(img_gradient, shifter):
    calc_color = []    
    for j in range(0, len(img_gradient)):       
        color = img_gradient[j][1]
        
        current_LED_num = j + shifter        
        
        if current_LED_num > LED_COUNT-1: 
            current_LED_num = current_LED_num % LED_COUNT
        calc_color.append([current_LED_num, color])
        
    return calc_color   

  
# fade between colors     
def fade_gradient(strip, col_map_1, col_map_2, speed):   
    fade_dist =  45
    for counter in range(0, fade_dist):
        col_map_inter = []
        for led_count, _ in enumerate(col_map_1):                
                R_inter = int(col_map_1[led_count][1][0] + counter/fade_dist*(col_map_2[led_count][1][0] - col_map_1[led_count][1][0]))
                G_inter = int(col_map_1[led_count][1][1] + counter/fade_dist*(col_map_2[led_count][1][1] - col_map_1[led_count][1][1]))
                B_inter = int(col_map_1[led_count][1][2] + counter/fade_dist*(col_map_2[led_count][1][2] - col_map_1[led_count][1][2]))
                ins = [col_map_1[led_count][0], (R_inter, G_inter, B_inter)]
                col_map_inter.append(ins)
        illuminate_all_pos(col_map_inter)
        time.sleep(0.5/(speed/100))
        
        
# gradient animation functions      
def rotate_gradient(strip, img_gradient, speed):
    bright = 255
    col_map_old = []
    for k in range(0, LED_COUNT):
        col_map_old = shift(img_gradient, k)
        col_map_new = copy.deepcopy(col_map_old)

        col_map_new.append(col_map_new.pop(0))
        for en_counter, entry in enumerate(col_map_new):
                col_map_new[en_counter][0] = col_map_old[en_counter][0]   
        fade_gradient(strip, col_map_new, col_map_old, speed*100)
        
        
# Define functions which animate LEDs in various ways.
def colorWipe(strip, color, wait_ms=50):
    """Wipe color across display a pixel at a time."""
    for i in range(strip.numPixels()):
        strip.setPixelColor(i, color)
        strip.show()
        time.sleep(wait_ms/1000.0)


# Main program logic follows:
if __name__ == '__main__':
    # Process arguments
    parser = argparse.ArgumentParser()
    parser.add_argument('-c', '--clear', action='store_true', help='clear the display on exit')
    args = parser.parse_args()

    # Create NeoPixel object with appropriate configuration.
    strip = Adafruit_NeoPixel(LED_COUNT, LED_PIN, LED_FREQ_HZ, LED_DMA, LED_INVERT, LED_BRIGHTNESS, LED_CHANNEL)
    # Intialize the library (must be called once before other functions).
    strip.begin()

    print ('Press Ctrl-C to quit.')
    if not args.clear:
        print('Use "-c" argument to clear LEDs on exit')
        
    i=0    
        
    try:
        color_maps_li = gradient_maps_list
        fade_gradient(strip, empty_map, gradient_map_original, speed/3)
        while True:
            for map_counter, c_map in enumerate(color_maps_li):
                rotate_gradient(strip, gradient_map_original, speed)
                fade_gradient(strip, gradient_map_original, color_maps_li[map_counter], speed)
                rotate_gradient(strip, color_maps_li[map_counter], speed)
                fade_gradient(strip, color_maps_li[map_counter], gradient_map_original, speed)
                
    except KeyboardInterrupt:
        if args.clear:
            colorWipe(strip, Color(0,0,0), 10)
