import numpy as np
import matplotlib.pyplot as plt


color1 = [255, 128, 0]
color2 = [0, 128, 255]


def create_gradient(color1, color2, size_x, size_y):
    layers =  []
    for i in range(3):
        x = np.linspace(color2[i]/2, color1[i]/2, size_x)
        y = np.linspace(color2[i]/2, color1[i]/2, size_y)
        x = x.reshape((100, 1))
        layer = (x+y) / 255
        print(layer)
        layers.append(layer)
    return np.dstack(layers)


img = create_gradient(color1, color2, 100, 100)
plt.imshow(img)
plt.show()