Very fun game! It took me a bit to understand what to do to get the correct colors, but once I got enough resources I was able to figure some of it out... still not sure how to get that second blue color though.
Indeed the best way to solve the puzzle is to tweak with the colors. The second blue is not really used to "win" but allows you to do some sort of speedrun. But I won't spoil the way to get it ;)