math of Mixing colours My brother asked me if I can give a mathematical formula for adding colours like in real life when adding red, green and blue one will get white but with these axioms:

*

*the addition operation is commutative meaning red+blue = blue + red


*the addition operation is linear (just for simplicity) we both studied linear algebra and that was the first idea to build a mathematical system for mixing color.


*the addition is associative meaning red + red + blue + green = red + blue + green + red = white + red = pink


*the system is mainly about primary, secondary and known colours: red, green, blue, white, black.
And the colours from combining two or more and known ones like (yellow, orange, purple,...)


*the system preferably a discrete one(continues which have hues and colours) discrete system can be established from a continues one by dividing it into small intervals each with specific colour like naming the interval red even if it includes shades of red (light red, dark red)
With these conditions in mind I thought about the unit circle in 3D with red = (1,0,0), green = (0,1,0), and blue = (0,0,1) and I would normalize the result to keep the system closed the problem is that associativity is violated in this system, any help in improving the system or a new system that works is fine.
(Also my brother is interested in additive colours and namely RGB and not in subtractive colours such as CMY.)
 A: One approach that satisfies some of what you want is to have each color a triplet of numbers which are $0$ or $1$.  The first represents the presence/absence of red, the second green, and the third blue.  You add componentwise with $0+0=0, 0+1=1+0=1, 1+1=1$  The colors are
$$
\begin {align}(0,0,0)\ &\text{black}\\
(1,0,0)\ &\text{red}\\
(0,1,0)\ &\text{green}\\
(0,0,1)\ &\text{blue}\\
(1,1,0)\ &\text{yellow}\\
(0,1,1)\ &\text{cyan}\\
(1,0,1)\ &\text{magenta}\\
(1,1,1)\ &\text{white}
\end {align}$$
A: You could try something like this. A paint pot is a vector in $\mathbb{N}^n$, where $n$ is the number of primary colours. A pot $(a_1, \dots, a_n)$ contains $a_i$ atoms of paint of colour $i$. The standard basis vectors are very small pots of a single colour; the zero vector is the empty pot. To describe the colour of the contents of a nonempty pot, apply to the map
$$
(a_1,\dots, a_n)\mapsto \frac{1}{\sum a_i}(a_1, \dots, a_n)
$$
where we view vectors in $\mathbb{Q}^n$ with nonnegative entries that moreover sum to 1 as colours in the obvious way.
