botalaJwaTlhaga
→ green()Reads how much green a colour contains.
botalaJwaTlhaga(colour)Setswana has a single word covering both blue and green together: botala. So green and blue cannot both take botala, and neither may take it alone — doing so would teach that one half of the word is the “real” one.
Both therefore take the full disambiguating compound: botalaJwaTlhaga (the grue of the grass) and botalaJwaLoapi (the grue of the sky). botala itself stays free for a learner to use as a variable name.
By default it returns a number from 0 to 255, and it follows seeloSaMmala exactly as bohibidu does.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
mmala | mmala | The colour to read. |
Examples
Section titled “Examples”tiro setaLoeto() {
thalaKanefase(400, 200);
bokamorago(220);
tlogelaMothalo();
metlha mmala = bopaMmala(90, 200, 140);
metlha dikarolo = [bohibidu(mmala), botalaJwaTlhaga(mmala), botalaJwaLoapi(mmala)];
gopheta (diri i = 0; i < 3; i = i + 1) {
kwala(dikarolo[i]);
metlha bogodimo = dikarolo[i] / 255 * 140;
tlatsaMmala(60);
thalaKhutlonne(50 + i * 110, 170 - bogodimo, 70, bogodimo);
}
}