The SV[Shiny Value] is what determins if the egg will be shiny or not by if it matches your own SV. Say, for instance, your SV is 1234, and you've bred a bunch of eggs with the following SVs
1324
1243
2143
1234
4321
Out of those five eggs, the only one that would be shiny when hatched is the one that has your shiny value on it. In other words, the egg with the SV of 1234, which matches your SV for this; would hatch as a shiny whatever pokemon it is. The rest would all be normal colors.
Basically if your SV is 1234, and you breed an egg with 1234 as its SV then
TSV = ESV = Shiny
TSV /= ESV = Normal
(TSV = Trainer Shiny Value, ESV = Egg Shiny Value)
Note: To find these values you need a program called InstaCheck Hotspot. Don't ask me how to use it though, I've never been able to get it to even start.
Oh, and actual SV values are between 0 and 9999.
Actually they are between 0-4096.