Thing
This commit is contained in:
parent
844bf74f54
commit
1b1049e03c
1 changed files with 3 additions and 2 deletions
|
@ -1,4 +1,6 @@
|
||||||
import logging
|
import logging
|
||||||
|
import itertools
|
||||||
|
|
||||||
from colour import Color
|
from colour import Color
|
||||||
from typing import List, Callable, Optional, Union, Tuple
|
from typing import List, Callable, Optional, Union, Tuple
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
@ -54,8 +56,7 @@ class Filling(Enum):
|
||||||
GREATEST = 3 # Repeat the longest color streaks
|
GREATEST = 3 # Repeat the longest color streaks
|
||||||
|
|
||||||
def widen(colors: List[Color], width: int):
|
def widen(colors: List[Color], width: int):
|
||||||
L = []
|
return list(itertools.chain.from_iterable([[e] * width for e in colors]))
|
||||||
return map(L.extend, [[e] * width for e in colors])
|
|
||||||
|
|
||||||
|
|
||||||
def blendLedBar_simple(colors: List[Color],
|
def blendLedBar_simple(colors: List[Color],
|
||||||
|
|
Loading…
Reference in a new issue