You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@haata - here's the script I wrote FYI. It linear interpolates between the colors based on the number of steps and outputs full-keyboard frames.
importnumpyasnpfromscipy.interpolateimportinterp1dcolors= [[105,255,105]] # Whitecolors.append([0,0,0]) # Darkcolors.append([255,0,0]) # Redcolors.append([255,60,0]) # Orangecolors.append([255,255,0]) # Yellowcolors.append([0,255,0]) # Greencolors.append([135,135,0]) # Light Bluecolors.append([0,0,255]) # Dark Bluecolors.append([90,0,255]) # Purplecolors.append(colors[0]) # first color again - makes a loop#Steps between colorsteps=100# Decompose lists into individual color listsreds= [item[0] foritemincolors]
greens= [item[1] foritemincolors]
blues= [item[2] foritemincolors]
# X axis = array from 0 to number of colorsx=np.arange(0,len(colors))
# Interpolate Functionsf_red=interp1d(x,reds)
f_green=interp1d(x,greens)
f_blue=interp1d(x,blues)
# Generate final x valuesstep=1/(steps+1)
x_fin=np.arange(0,len(colors)+step-1,step)
# Write to file (overwrite)f=open("output.txt", "w")
forxinx_fin:
red=int(f_red(x))
green=int(f_green(x))
blue=int(f_blue(x))
f.write("P[c:0%%](%s,%s,%s),P[c:100%%](%s,%s,%s);\r"% (red,green,blue,red,green,blue))
f.close()
The text was updated successfully, but these errors were encountered:
@haata - here's the script I wrote FYI. It linear interpolates between the colors based on the number of steps and outputs full-keyboard frames.
The text was updated successfully, but these errors were encountered: