Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

I would like to make a childrens computer program emulating colour mixing of paints. Since coputers generally use the RGB colour model, I dont know how to achieve this. Can you help?

0
Posted

I would like to make a childrens computer program emulating colour mixing of paints. Since coputers generally use the RGB colour model, I dont know how to achieve this. Can you help?

0

The technical details of paint mixing are quite complex, but you can make an approximation with simple subtractive mixing. The trick will be to convert from the subtractive model for paints to the additive model for your computer program. What you need to do is abstract the color combinations in the subtractive model and then convert the result to RGB. For example your “blue” paint is generally really a cyan color (G + B to display it) and yellow is G + R. If you did additive mixing of lights, then the result would be R + 2G + B (just add up the values). However, a subtractive mixture behaves differently. You have to look at the light that is missing. The cyan has removed the R and the yellow has removed the B, so starting with white (R + G + B) and removing those amounts you end up with (R+G+B) – B – R = G (the green you are looking for). You then have to factor in various amounts of these mixtures. I hope that is helpful. There are also some demos at the SDC Colour Museum website.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.