Skip to content
ExamplesOpen editor ↗

POSTERIZE

→ POSTERIZE

A `tlhotlha` value: cut down the number of colours used.

tlhotlha(POSTERIZE, count)

A second number is how many colours to keep in each part: tlhotlha(POSTERIZE, 4) keeps four reds, four greens and four blues.

It does not change colours already at the extremes. Measured: a pure red dot [255, 0, 0] is unchanged even at POSTERIZE, 2, because 255 and 0 are the extreme values. What changes is the colours in between: [140, 115, 0] becomes [170, 85, 0] at four.

The name stays English. Posterize is a term from old poster printing, and no Setswana word for it exists in any source searched — the route hue and millis took. This page is where the explanation lives.

The palm in only a few colours
tiro setaLoeto() {
  thalaKanefase(300, 160);
  bokamorago(245);

  diri mokolwane = letela tlisaSetshwantsho('mokolwane.png');
  thalaSetshwantsho(mokolwane, 75, 5, 150, 150);
  tlhotlha(POSTERIZE, 3, maaka);

  tlhalosa('Setshwantsho sa mokolwane se se dirisang mebala e mmalwa fela, jaaka poseta.');
}

tlhotlha, BOPUTSWA, MOLELWANE