pip install pymixbox
import mixbox
rgb1 = (0, 33, 133) # blue
rgb2 = (252, 211, 0) # yellow
t = 0.5 # mixing ratio
rgb_mix = mixbox.lerp(rgb1,rgb2,t)
print(rgb_mix)
z1 = mixbox.rgb_to_latent(rgb1)
z2 = mixbox.rgb_to_latent(rgb2)
z3 = mixbox.rgb_to_latent(rgb3)
z_mix = [0] * mixbox.LATENT_SIZE
for i in range(len(z_mix)): # mix together:
z_mix[i] = (0.3*z1[i] + # 30% of rgb1
0.6*z2[i] + # 60% of rgb2
0.1*z3[i]) # 10% of rgb3
rgb_mix = mixbox.latent_to_rgb(z_mix)
Copyright (c) 2022, Secret Weapons. All rights reserved.
Mixbox is provided under the CC BY-NC 4.0 license for non-commercial use only.
If you want to obtain commercial license, please contact: [email protected]