Hi Felix -
After re-reading your original question,
"...how do i adjust these so that they are of equal tonal value ie if they were grayscale they would look identical...", I am worried that you have not factored in the fact that there many ways to turn a color scene into a B&W image, both in Photoshop, as well as in the real world.
For example, if you were using orthochromatic film (or trying to imitate a very old-school look in PS), in my example of a yellow and a blue square, you would need many fewer photons of blue light compared to the number of photons of amount of yellow light compared to shooting with one of the many variants of panchromatic films (or software equivalents) to obtain
"equal tonal value". In fact, even the number of photons is not a perfect, one-size-fits-all basis on which to evaluate whether the two squares have equal tonal values. The same is true for trying to use the power of the light at the two different wavelengths because blue photons carry more energy per photon than red photons. If, instead of physical properties, you switch to using physiological responses to different wavelengths of light as the basis of comparison of
"equal tonal value", then you get into all of different coordinate systems that we mentioned in previous posts, e.g., HSB, HSL, HSV, Lab, etc.
The bottom line is that there is no single "right" answer to your question. However, if you told us the context of your question, or a bit more about exactly what you are trying to accomplish, we could almost certainly give you pointers that would help in your specific situation. For example the approach suggested by @
thebestcpu (ie, staying in whatever color space you are most familiar with, but reading out the coordinates of interest) could easily be modified to work to equalize two "B" values in HSB, two "L" values in HSL, two "V" values in HSV, or even the results of a custom setting of a "Black-white" adjustment layer in Photoshop.
Just let us know.
Tom M