my question is if i have only 3 basic colors (each made of rgb):
color1 : R:150, B:zero, G:255 color2 : R:255, B:150, G:zero color3 : R:zero, B:255, G:150
They can be mixed using the formula :
new_color = floor(X*0.9)+floor(Y*0.1)
X and Y can be a basic color or a new color already created by using the formula. for example, if i want to mix color1 as main with color3 :
new_color(R,B,G) = (floor(0.9*150)+floor(0.1*0) , floor(0.9*0)+floor(0.1*255) , floor(0.9*255)+floor(0.1*150) ) = (135, 25, 244).
I need to find a way to mix many colors in order to get a desired color, for example : R:187 B:135 G:201
so far i wrote a "brute force" program which go all over the combinations of basic colors (runing for 7 days now got up to 16 mixing steps) and a bit smarter AStar algorithm (got good reults for small sequnces, letting it run for the week end...). Since i know some colors are made of more then 100 mixing steps, it will take me forever to go over all of the results... Help me find a smarter and faster way to solve this.
Thanks.