How do component wavelengths *add* to wavelength of light color? Say you have 3 leds at frequencies (or wavelengths) $u_1, u_2, u_3$ in Hz (or nm).  Then how do you calculate the apparent or center of, or blah frequency (I don't know what I want really) of the resulting color say if you were to have one light at each $u_i$ and you could only adjust intensity (amplitude) of each light component $i$ (at fixed freq/wavelength $u_i$)?  For instance embedded software developers can use this as a first guess to set pwm intensity levels for RGB leds (each component (R,G,B) has a central / main / predominant frequency that you can read about from the LED's data sheet).
So we may have a frequency of one known colored LED, but we also have an RGB led (3 colored LEDs in one package), and we want its color to match the first's.
Thank you for any guidance.  Remember we don't have to calc. exact values and because of unforseen variables the final setting will be adjusted any way.  Another solution is to make buttons do this and do it by eye. But thought I'd post here and we might use any formula in code later so...
 A: It’s all about the three kinds of color receptors in the eye. A typical human responds to color through three types of cone cells in the retina, called $L$, $M$, and $S$ cones. Each type has a different response curve as a function of frequency.  The sensation of color is distinguished by a tristimulus, which can be considered a vector $(r_L,r_M,r_S)$ of numbers that is sent to the brain to be interpreted. Blue light will cause the $S$ cones to respond most strongly. According to an Excel sheet of tristimulus values here, the tristimulus for 410nm blue (normalized in some way, I assume) is $(4.02,0.11,19.2)$. For 530nm yellow, it’s $(18.1,94.2,4.61)$, and so on.
The brain perceives a hue based on the direction of the tristimulus vector in three-space. (The magnitude of the vector is related more to the saturation or lightness of the color. A yellow-direction vector of low magnitude will seem brown, and a green-direction vector of large magnitude will seem lime, as opposed to leaf-green.) It’s probably safe to assume that for a reasonable range of stimulus magnitudes, the vector’s direction determines the apparent hue.
Your led colors $u_1$, $u_2$, and $u_3$ will have tristimulus vectors $\vec{t}_i=(r^i_L,r^i_M,r^i_S)$. By choosing intensities $I_1$, $I_2$, and $I_3$, you can create the tristimulus vector $\sum_{c\in\{L,M,S\}} I_c t_i$. The vectors you can create form a color triangle. If your leds are monochromatic, your triangle’s vertices will be near the wavelength-labeled curve in the public domain picture below, from that Wikipedia page. (Ignore the $x$ and $y$ axis values.)

The colors of the rainbow will be created as well as possible by points along the left and right (not bottom) sides of your color triangle (assuming your colors are vaguely red, green, and blue, giving a similar triangle). Note that these will always use the middle-frequency diode color and only one of the other two. The wavelength on the outer scale nearest a point on the triangle perimeter will be the dominant one to the viewer. I suspect you’d go in the direction away from the triangle’s centroid to get the specific apparent primary hue wavelength. Using none of the middle diode will produce hues that aren’t rainbow hues, like red-violet, so going out from the centroid through the bottom side of the triangle won’t reach a number on the wavelength-labeled curve.
Hopefully you can make some progress from what I’ve said here. As you can guess, there’s a huge amount of information online and much research has gone into both the psychology of perception and the engineering, both of which are behind the technologies of color displays, printing techniques, and more. It’s a fascinating topic to explore.
