dariuszb09 wrote: ... but that's not what I meant. I want it to sum (values) only e.g. cells with a blue background and a yellow font ...
As you write, they understand you that way - is there no "no" in the above sentence or is there too much "only"?
dariuszb09 wrote: ... I want it to sum (values) (? ...?) e.g. cells with a blue background and a yellow font, and separately with a purple background and a yellow font and separately a green background and a yellow font, or a blue background and a red font, a blue background and green font etc. The font color and background should ideally be given as in the functions above in separate cells
1. And how do I add up? That's right, you have patterns in separate cells ...

... only that the disadvantage of this function is that it does it based on a pattern (everyone does this), which you must select, which is in a cell, and which is not entered in the function call as an argument of "enter the amount of blue with yellow ".
2. You entered the "problem" yes and no different, you gave the "material" for processing, read what you wrote ... you did not specify other criteria, and I do not intend to guess ...

...
3. And then what do you mean by "sum" - the content of cells meeting the criteria? The number of these cells? By selecting the appropriate optional numeric argument you designate this function for what to count. Just as I write, the function does it after the pattern taken from the pattern cell, and not on the basis of manually entered arguments of the type vb blue, vb yellow, vb white, etc.
4. If you think about the "automatic" recognition of colors by a function, without specifying its pattern ("in words", indicating the range of conditions), then ...

... how many colors do you think she should recognize?
For RGB there are probably 16 777 216 (for other systems, e.g. CMYK is 4 294 967 296) ...

...
In old Excel, 56 are basic (+ 1 "colorless") - Check how much you have in your new ...

...:
Use links from
adamas_nt and
Zbych034 , exercise a little ... cells ...

...