As I see your explanation, what you're looking for can be stated via another way saying
Y = aX + b
where Y is output vector, X input vector and a & b are the coefficients you want to find.
Why so? And what is happening?
First thing first: I recommend to look the video [4] about how matrices and vectors work together and form after multiplication very familiar equations:
Y = a1 * x1 + a2 * x2 + a3 * x3
Now you see, you do not only get R + G + B but also some constants supplied for each of the variables.
About polynomial solutions I found [2] and [3] but reading through [3] you'll soon notice it is about completely different approach:
Y = a1 * x + a2 * x^2 + a3 * x^3
which you don't want.
So, you find something called linear regression and a so called Deep Neural Network for example to solve it [1].
I would summarize the source [1] in these steps:
You have to find some training data. That is examples of correct Y values, when X values are known.
Then you build in Python note book some code that has: a Neural Network with hidden layer(s), Activation Function, Back Propagation and Objective Function.
Many many iterations with the data, called Training.
There are plenty of samples and courses online about these in detail, but with correct tools and tutorials some dozen lines and no more are needed.
Process is ended with validation phase with some more known data items and results. It can tell you how well the estimated model works.
Final Notes:
As you may observe, the solution includes quite a many funny terms you have to learn somehow before mastering the task. For example Udemy has great online courses on this topic, also free tutorials are available on another sites. Your plans sound quite ambitious compared to the knowledge you have so far, so I really do recommend you learn little bit more to be able to fine tune the already given examples online. For example tutorial [5] includes one. It is at first quite complicated code, you'd need quite a lot practice to master it line by line.
In short:
Find your favorite tutorial, study neural networks a little bit (basics) and pick code sample to start experimenting. It is a long way but it is worth it.
Source:
[1] https://lightsapplications.wordpress.com/linear-regression-and-deep-learning/
[2] https://www.ritchieng.com/machine-learning-polynomial-regression/
[3] https://arachnoid.com/polysolve/
[4] https://www.youtube.com/watch?v=F2lJ7oSwcyY
[5] https://missinglink.ai/guides/neural-network-concepts/backpropagation-neural-networks-process-examples-code-minus-math/