Magical gene / magical coat genes

Contour

The coat reads as a contour map: six bands of a landscape stacked one inside the next, from deep green at the low ground through yellow and gold to a red-brown at the summits, with a drawn contour line ruled through the middle level. The coloured form runs the low ground and the high ground off two independent hues instead.

What it can come out as

OutcomeCarrying
ContourCt/Ct · Ct/Cx · Ct/n
Coloured contourCx/Cx
Wild typeCx/n · n/n

How each one is actually drawn - region by region, and the layers it is built from - is on the coding tab.

Crossing two of them

Finding one

About 1 in 1,786 wild horses is born showing this. That is the whole of the supply: catch one, or make one with the carrot below. Breeds set their own pools and a breed built around this gene will carry it far more often than the wild population does.

Wild pairShows asHow often
Ct/CtContour0.002% — 1 in 50,000
Ct/CxContour0.008% — 1 in 12,500
Ct/nContour0.038% — 1 in 2,632
Cx/CxColoured contour0.008% — 1 in 12,500
n/nWild type99.944%

Its gene carrot

The file

common/src/main/resources/horsegenetics/genes/contour.json — a data-driven gene, not a Java class. It is listed in the index.json beside it and registered by Genes' class initialiser at startup.

Keyhorsegenetics.contour
Phasemagical — it adds signed colour in phase 3, after the pigment has resolved
Priority122 — where it sits in the one (priority, key) paint order
AllelesCt · Cx · n
Varies per horse4 values drawn once off the expressing allele copy, so a foal that inherits the copy inherits the look
Built fromFRACTAL, TOWARD

Why it is built this way

THE BANDS ARE DISJOINT AND HAVE TO BE. Each band is a threshold on one FRACTAL field, so band 0.38 sits entirely INSIDE band 0.30 - and a magical gene's layers each measure their delta against the colour the gene started from and then sum, so six nested TOWARDs do not paint six bands. They paint one colour, which is whatever six deltas add up to, and six pale deltas add up to white. That is exactly how this gene shipped: an almost-white horse with a brown patch, and the pastel palette it was given was the author compensating for a wash they could not see the cause of.

So every band now subtracts the threshold above it and paints only the ring between the two. Once they are disjoint the colours can be what a contour map actually looks like - a hypsometric ramp with real chroma in it - rather than six tints chosen to survive being added together.

The 0.52 band is missing on purpose: that is where the drawn contour line goes. The line is 0.52 minus 0.56, so the band above it starts at 0.56 and the two do not overlap either.

TWO hue knobs, not one plus an offset. The coloured form wants the low ground and the high ground to be different colours, and a knob cannot be offset by a constant in this format - there is no '$inkHue + 120'. inkHue and highHue are therefore INDEPENDENT draws, which means a horse can roll two hues that sit next to each other and come out nearly monochrome. That is the honest cost of the missing arithmetic and it is a good deal less bad than one flat hue.

What it paints

Each outcome, described the way the gene file describes it, and then the layers that draw it in the order they are painted. The prose is the part a reader checks a bake against; the list underneath is what the engine actually did.

Contour

Lobed masses ringed by nested bands stepping from cream through pink and mint down to near-black, with a hard dark line tracing one level.

Layer order is lowest threshold first, and it has to be: each band is painted over the whole of the one below it and survives only as the ring the next one does not cover. Reverse any pair and the outer of the two disappears.

  1. the band from 0.30 to 0.38 — FRACTAL × FRACTAL, painted with TOWARD
  2. the band from 0.38 to 0.44 — FRACTAL × FRACTAL, painted with TOWARD
  3. the band from 0.44 to 0.52 — FRACTAL × FRACTAL, painted with TOWARD
  4. the band from 0.56 to 0.60 — FRACTAL × FRACTAL, painted with TOWARD
  5. the band from 0.60 to 0.68 — FRACTAL × FRACTAL, painted with TOWARD
  6. the band from 0.68 to the top — FRACTAL, painted with TOWARD
  7. the drawn contour line at the middle level — FRACTAL × FRACTAL inverted, painted with TOWARD

Coloured contour

The same map in one colour this line of horses runs to, the levels separated by lightness alone.

The recessive coloured half of the usual pair, on a single hue. The source's six colours are not six decisions - they are one value ramp with a pink and a mint sitting on it - so the ladder 0.86, 0.84, 0.88, 0.70, 0.55, 0.24 carries the map and the hue is free. Note the first three are nearly level: on a real map the outer bands separate by hue rather than by value, and flattening them into a monotonic ramp loses the thing that makes the middle levels read.

  1. the band from 0.30 to 0.38 — FRACTAL × FRACTAL, painted with TOWARD
  2. the band from 0.38 to 0.44 — FRACTAL × FRACTAL, painted with TOWARD
  3. the band from 0.44 to 0.52 — FRACTAL × FRACTAL, painted with TOWARD
  4. the band from 0.56 to 0.60 — FRACTAL × FRACTAL, painted with TOWARD
  5. the band from 0.60 to 0.68 — FRACTAL × FRACTAL, painted with TOWARD
  6. the band from 0.68 to the top — FRACTAL, painted with TOWARD
  7. the drawn contour line at the middle level — FRACTAL × FRACTAL inverted, painted with TOWARD

Wild type

Unmarked.

Paints nothing.