It's actually length, weight, and muzzle velocity, but length is most important, weight second, and MV the least important.
The JBM calculators include a stability calculator
that works well with .30 caliber bullets. Pick a muzzle velocity you will likely achieve with your bullet weight of interest, then change the bullet length in the calculator until the stability result is at least 1.4 for best match accuracy and 1.3 for hunting accuracy, and not over 1.7 for best match accuracy and not over 3.0 for hunting accuracy. Then you will be assured of a good shot at achieving the desired performance level. Note that atmospheric conditions can be factored in as well.
Many match bullets can actually tolerate higher numbers, into the 2's. The upper limit is about not introducing too much bullet wobble due to mass symmetry imperfections, and many modern match bullets are so good that doesn't seem to happen despite spinning a bit faster than is generally considered optimal.
Nonetheless, sticking to the 1.4 to 1.7 criterion, for example, at 2500 fps MV with your 12" twist you can use a 200 grain bullet for target accuracy if it isn't longer than 1.373" or shorter than 1.284". You can use a 180 grain target bullet if it isn't longer 1.324", or shorter than 1.238". Etc. I leave you to calculate your own on the JBM site. The sight also has a partial table of bullet lengths for reference under "lengths" on the menu column at the left.