How flower hybridization works: some sort of guide (wip)
Short story: It's magic, Joel
Long story: In Animal Crossing New Leaf, each individual item has two types of values associated with it: an item ID that determines what it is and a set of flags that store various other values. For furniture these flags store things like customization state, and for all items the uppermost couple bits store things like whether it's buried or watered (outside) and how it's rotated (inside). For flowers, flags store... uh, something.
Pop open any ACNL savefile in a save editor and you'll notice every single flower in your town has a value attached to it. There's 0cs on those yellow lilies, 31s on those red pansies, whatever. These values are used to determine what offspring a flower can produce.
Seemingly what the game does is take these values, run them through whatever algorithm it has, and look up the color associated with the result for that species.
To start off, each flower that's spawned "normally" has a flag value specific to its species and color. By "normally" I mean most of the ways you get flowers- spawned spontaneously in an open spot, planted by your villagers, bought from Leif, kidnapped from an island tour... basically anything that isn't breeding. This means that with fresh flowers you can guarantee the outcomes you get, and work from there for rare hybrids like purple pansies. Or you can make jape flowers, like a pair of yellow lilies that can produce every other possible value, and thus color, of lily. There's a value for white tulips that can produce reds, for example, but those whites and reds can't produce pinks.
However, while you can have some idea of what results you get by controlling what parents you use, there's still an element of chance.
The nitty-gritty of it...
One byte of flags is used for each flower. For breeding purposes, these seem to be interpreted as four pairs of bits- there doesn't seem to be a name for that, so I'll call them "bibbles".
These are the possible outcome for each pair of bibble values-
11 with 11 can only produce 11; 00 with 00 can only produce 00.
11 and 00 can only produce 01.
11 and 01 can produce either 11 or 01; 00 and 01 can produce either 00 or 01.
01 and 01 can produce 00, 01 and 11.
10 doesn't seem to be an attainable bibble value under any circumstances.
An example, using lilies:
A red lily's default spawn value is 31, while a yellow lily's is 0c. Here's the bibbles:
00 11 00 01 red
00 00 11 00 yellow EQUALS
00 01 01 00 orange (14), or
00 01 01 01 yellow (15).
So here you can see 00x00, 11x00 and 00x01 at work. The former two only have one outcome while the latter has some variability, producing two different results.
Incidentally, as you can see those 15 yellows have all bibbles set to 01 (except the first one, which is always 00 in most species). As mentioned before, pairing 01 with 01 can have all three bibble values as results... so pair two of these up together and watch them spit out all sorts of crazy results. (Except it seems like they'll mostly produce more yellows anyway. It seems like 01 is a more likely outcome for 01x01 than the other two, so outcomes will sort of tend towards the center of the distribution. For whatever reason yellows and oranges tend to be towards the middle of the values range...)