Is there any existing technology that takes a variety of filaments of different colors (say a CMYK blend), and then blends them in different ratios to achieve whatever color you want?

I had this thought the either day, and I figure it’s either stupid, already exists, or genius.