This commit is contained in:
Constantin Gierczak--Galle 2023-12-15 11:23:29 +01:00
parent 844bf74f54
commit 1b1049e03c

View file

@ -1,4 +1,6 @@
import logging
import itertools
from colour import Color
from typing import List, Callable, Optional, Union, Tuple
from enum import Enum
@ -54,8 +56,7 @@ class Filling(Enum):
GREATEST = 3 # Repeat the longest color streaks
def widen(colors: List[Color], width: int):
L = []
return map(L.extend, [[e] * width for e in colors])
return list(itertools.chain.from_iterable([[e] * width for e in colors]))
def blendLedBar_simple(colors: List[Color],