Spielerando

Ripen a fruit from green to red without a muddy brown in the middle

Blending two colours by averaging the numbers gives a dull, dark middle: green and red make something like old mud. In a farm game that colour shows up right when the player wants a lively sign of progress. Here is how to blend so the middle is bright, and how to place the stops of the colour journey.

Why this works

Screens store colours in a way that matches how our eyes see brightness, not how light adds up. Mixing in true light, and passing through a colour in between, keeps the middle bright instead of dull, as it would be in real fruit.

When not to use it

Not for a quick fade of many small things, or on a very weak device, where the extra calculation per colour is a waste. A plain mix looks fine for similar colours, so use it for those.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 43 lines of example code with 3 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Ripen a fruit from green to red without a muddy brown in the middle" (read_entry fruit-ripens-through-yellow-instead-of-turning-muddy-brown) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP