Skip to content
ExamplesOpen editor ↗

saturation

→ saturation()

Reads how strong a colour is — how far it is from grey.

saturation(colour)

Like hue and lightness, the name is left as it stands because it is written nowhere in Setswana in any source consulted.

The page explains the idea instead: saturation says how strong a colour is. A high value is a pure, full colour; a low one moves it towards grey. bopaMmala(255, 0, 0) is fully saturated; bopaMmala(128, 128, 128) is 0.

⚠ Watch this. A colour built in RGB returns its HSL saturation even with seeloSaMmala(HSB) set — the mode the colour was built in decides, not the mode you are in now. Only a colour built in HSB returns the HSB saturation.

NameTypeDescription
mmalammalaThe colour to read.
From grey to a pure colour
tiro setaLoeto() {
  thalaKanefase(400, 200);
  bokamorago(220);
  seeloSaMmala(HSB, 360, 100, 100);
  tlogelaMothalo();
  gopheta (diri i = 0; i < 8; i = i + 1) {
    metlha mmala = bopaMmala(340, i * 14, 95);
    kwala(saturation(mmala));
    tlatsaMmala(mmala);
    thalaKhutlonne(i * 46 + 26, 60, 40, 80);
  }
}

hue, phatsimo, lightness, seeloSaMmala