How much darker should yellow be get the same contrast as other colors?

By how much should the color yellow be darkened to get the same contrast values as other colors displayed on a computer screen?

This is something that i would do by sight, but i was wondering if there aren't any rules around this.

I created 6 rows of blocks in 6 different colors. Each row has a light, normal, dark and text block.
The second block in each row is the color reference and is the color in its brightest form(#FF0000, #FF00FF, #0000FF, ...).
The first blocks are lighter color codes and the third blocks are darker color codes. Each is of these is lighter or darker with the same amount as the other colors.
The fourth block is the same as the first block with text in the color of the reference block.

color table

As you can see, yellow has the smallest contrast in comparison to the other colors, even though the colors are proportional.
To get the yellow text near the same contrast as let's say green, you already need to change the text color from (255,255,0) to (245,245,0).

Why is yellow on white so low in contrast and by how much should yellow be darkened to get the same contrast as the other colors?