Growmore is a good all-rounder and of course much easier, even though I'd just figured out how to answer your original question!
Please go for it, more answers the better....
OK - I wasn't great at maths, even when I needed to be (which was a long time ago), but I think this is correct:
Formula (per 100g of made-up fertiliser): grams of each ingredient = required %/actual % X 100
For the 6:10:10 potato fertiliser this equates to 29/56/20 grams of the NPK ingredients respectively (total 105 grams)
For the 6:8:15 onion fertiliser it equates to 29/44/30 (total 103 grams)
NPK analysis is based on the proportions by weight, so given that the ingredients are likely to be of different densities they would need to be weighed rather than measured by volume, although it's not an exact science and would probably make no difference in practice - how much you apply, your soil, and the weather will all have a bearing on how it's actually used by your plants.