Khimera Breeding - Genetics: Colour Scripts

There are two different color blending modes used. These are referred to as “default” and “bright” script.

RGB Format – “hex” colors
Our colors are saved in an RGB format commonly called “hex” code. To understand the color scripts, you need to understand a little more about “hex” colors.
Hex colors have six digits, each digit has 16 values (0-9, A-F) that are arranged in three pairs of two. Each pair of digits corresponds to one of three components: Red, Green, or Blue (hence RGB). These three pairs mix to create all possible colors. The range values go from 000000 – FFFFFF, white 000000 being pure black and FFFFFF being pure white. White is simply full red + full green + full blue. Black is 00 on all components. Remember: You’re mixing ling and not paint. If you wanted just Red, you’d have FF0000. Yellow would be FFFF00. Magenta is red and blue, so it’d be FF00FF. 202020 would be a dark grey, 808080 an intermediate, and C0C0C0 a light grey.

Default Script
The default script simply takes red, green, and blue from each color (colors coming from the parent khimeras) and averages them. The final color’s components will fall anywhere with the range. So, ignoring the entire hex for a moment, a pair of colors where one has an FF red component and the other has a 00 red component will give you a final color with red being anywhere between FF and 00. Keep in mind that the green and blues affect the overall color.
For example, a blue khimera will have strong blue with weak red and green. The strongest blue you can have is 0000FF. A yellow khimera will have strong red and green, but blue will be weak. The strongest yellow is FFFF00.
Components for the two khimeras above look like this:
Blue khimera: Red – 00, Green – 00, Blue – FF
Yellow khimera: Red – FF, Green – FF, Blue – 00
The average of the red, green, and blue components (00 + FF) is 80. If a khimera fell exactly in the middle of the average colors it would be 808080 (Grey!).
The default script works best on similar colors that are not complementary (blue and yellow are complimentary). It is also ideal for greys, whites, blacks, or other colors that are in close proximity.

You can see that though bright green and bright fuchsia are possible, you also get some strange dull oranges / salmon.


These are possible results for yellow and blue. Notice how the green is very faded compared to the vibrancy of the starting colors.


These colors aren't too bright and are somewhat close on color wheel, so they will blend well on the default script.


This is included mostly for contrast with the bright script version, but notice how greys mix as intended in the default script. You get greys and blues and faded blues just like you'd expect.

Bright script
Calculations for the bright script involve changing our RGB color into a different color space called HSV (stands for Hue, Saturation, Value). Hue is the color (think of a rainbow - hue is where on this rainbow the color would fall), Saturation is how strong it is (it ranges from very strong to grey, it’s always a number instead of a color), and Value is how much light it has (think of it as going from white to black; this is also a number and not a color).

So, taking a khimera example, we'd have three components for each:
Khimera 1: Hue: Blue, Saturation: 100%, Value: 100%
Khimera 2: Hue: Yellow, Saturation: 100%, Value: 100%
In this new color space, we are now looking at the hue, saturation and value between the colors, not simply an average of RGB values. In this example, the saturation and brightness will remain since they are the same, and only the hue will change in the offspring.

The bright script works best on colors that are vibrant like strong blues and strong yellows, as it will not "fade" them and will retain their vibrancy (blue and yellow will give a vibrant green as opposed to a dull grey on the default script.)


Contrast this with the default predicition. All the possible colors are rich and vibrant here.


Blue and yellow give beautiful shades of green in the bright script.


Faded colors don't work as one would think. The resulting color can take after any color in hue (deep purple or green or in between) and the fadedness may or may not pass (because the green is bright). This means you may get some vibrant deep purples, faded greens, or vibrant or faded blues in varying hues.


Remember in the bright script the hue of both colors is calculated and a hue falling between both values is assigned to the resulting color? Greys can give unpredictable results when mixed with non-greys (blacks and whites are also shades of grey here) because they take after *red*. This means when you are breeding a heavily grey khimera to a khimera with heavily saturated colors, any bright results you get will have a hue ranging from red to the other color's hue. This is why you get purples and pinks instead of faded blues. This is also a case where the default script will perform better than the bright script.

Parent Entry
- Khimera Breeding