How many tulip colors are there?

There was an interesting conversation yesterday on the Sapiens discord, where Dave answered some questions about tulips.

majicDave Yesterday at 6:37 PM
So a tulip has 4 colors, topA, topB, botA, botB. then it has 2 mix values mixTop and mixBot. all of these values range 0-7. Hopefully someone can figure out what that adds up to :slight_smile:

The 8 base colors, Asyc pointed out that these match up with the 8 pigment colors we have for paints & paintings:

So how many colors are there exactly?

When counting permutations we multiply the number of choices we have in each step together. So since we have 6 decisions, each with 8 possible choices, we have 8^6 or 262,144 possible colors.

But wait…

majicDave Yesterday at 6:38 PM
so a mixTop of 0 gives topA, a mixTop of 7 gives topB, and somewhere in between gives somewhere in between

This means that we don’t have exactly 8^6 colors1. For mixing colors we effectively have one less choice, since (0 1) mixed with 0 is the same as (0 2) mixed with 0.

This implies we have 8^4*6^2 or 147,456 colors… but wait, some of those colors are mixed together.

This leads to the question, is (red blue) mixed with a value of 1 the same as (blue red) mixed with a value of 6?2 If they are different, then 147,456 is the correct answer. If they are the same, then we have more math to do.3

Okay, so now what? Now order doesn’t matter when choosing the two top / two bottom colors. There is certainly a way to do this with math… but I found it easier to reason about with a bit of code.

A color is defined as a 3-tuple (a, b, mix) where mix is an integer in the range [0, 8). Two colors (a, b, c) and (d, e, f) are the same if:

  • a = d and b = e and c = f (exactly the same)
  • a = b and b = e and a = e (all four colors are the same, so the mix doesn’t matter)
  • a = e and b = d and c + f = 7 (mixing (blue red) with 0 is the same as mixing (red blue) with 7, also applies to other mixes adding to 7)

Thus we just need to do a triple for loop for each possible color and mix, add these all to the set, and see how many things are in the set. Since the top and bottom colors are different, there will be (number of top colors)^2 total tulip colors.

Throwing this code into a repl4, we get the final answer. There are 53,824 total tulip colors.

Footnotes:

  1. There are 8^6 distinct combinations if you look at the stored data, but as a player, some are indistinguishable from each other.
  2. That is, is the function symmetric?
  3. The mix function is symmetric… so more math!
  4. See https://repl.it/@Bibliofile/TulipColors
13 Likes

Thank you Bib for working out this puzzle that’s the holy grail of blockheads tulips which has mystified us for so many years :tulip::heart:

Well done!

2 Likes

Asyc just judging from what I saw on looking glass you may have figured out all the colors

and yet I keep getting the same darn blue and red tulips:rofl::cry:

1 Like

Ouch…

I’m honestly frightened by the sheer amount of tulips there are and this only confirms the fact that there are too many and I will never go into tulip breeding. Thinking about it makes me dizzy.

3 Likes

I may have a very small fraction of the 53,824 colours which I’m sharing across a number of servers so others may enjoy them too🌷

4 Likes

And how much does this “small fraction” total at? I’m pretty sure there’s no way it’s below 10k.

Could be wrong though, tulip genetics seem weird to me.

1 Like

Where can I learn more about how breading tulips works?

There are a few guides in this forum. Search Tips & Guides for “tulip breeding” and you should find something.

2 Likes

I have not counted all the unique colours I have but it’s not 10,000 as my tulip depository is not full yet and it can hold 8500 tulips.

7 Likes

That’s a lot of tulips. ;-;

4 Likes

You’re the master of understatement, Testif :slight_smile:

2 Likes

Honestly, I thought Asyc was diminishing her achievements in the field of blockheadian tulip genetics. I’ve only seen a few of her collections (on Pixmilla and Unihorse, I think), but they seemed absurdly vast already.

I figured with the few snippets I’d seen, she’d probably be 1/5 of the way done, and I was wrong. :confused:

5 Likes

Thanks Testif for your vote of confidence. It is the goal for my fellow tulip enthusiasts and I to continue breeding/collecting/sorting/organising as many tulips as possible and share them with others whenever we can so that they can be enjoyed by all.

3 Likes