# Path: opc/nphue.py
# @timefunc
# def h_to_rgb(h, sat=1, val=255.0):
#     # Local variation of hsv_to_rgb that only cares about a variable
#     # hue, with (s,v) assumed to be constant
#     # h should be a numpy array with values between 0.0 and 1.0
#     # hsv_to_rgb returns an array of uints between 0 and 255.
#     s = np.full_like(h, sat)
#     v = np.full_like(h, val)
#     hsv = np.dstack((h, s, v))
# 
#     return hsv_to_rgb(hsv)


from ._baseclass import ArtBaseClass
from opc.nphue import h_to_rgb
import numpy as np



class Art(ArtBaseClass):

    description = "Classic plasma (almost)"

    def __init__(self, matrix, config):
        ones = np.ones(matrix.numpix).reshape((matrix.height, matrix.width))
        self.x = ones*np.arange(matrix.width)
        self.y = np.flipud(np.rot90(np.rot90(ones)*np.arange(matrix.height)))

        self.base = 128000


# Path: opc/nphue.py
# @timefunc
# def h_to_rgb(h, sat=1, val=255.0):
#     # Local variation of hsv_to_rgb that only cares about a variable
#     # hue, with (s,v) assumed to be constant
#     # h should be a numpy array with values between 0.0 and 1.0
#     # hsv_to_rgb returns an array of uints between 0 and 255.
#     s = np.full_like(h, sat)
#     v = np.full_like(h, val)
#     hsv = np.dstack((h, s, v))
# 
#     return hsv_to_rgb(hsv)


# Path: art/plasma.py
from ._baseclass import ArtBaseClass
from opc.nphue import h_to_rgb
import numpy as np




class Art(ArtBaseClass):

    description = "Classic plasma (almost)"

    def __init__(self, matrix, config):
        ones = np.ones(matrix.numpix).reshape((matrix.height, matrix.width))
        self.x = ones*np.arange(matrix.width)
        self.y = np.flipud(np.rot90(np.rot90(ones)*np.arange(matrix.height)))

        self.base = 128000


    def start(self, matrix):