phatsimo
→ brightness()Reads a colour's brightness — the B of HSB.
phatsimo(colour)phatsimo is a written Setswana word for brightness. It is the only one of the HSB/HSL ideas that has one, which is why hue, saturation and lightness stay English while this one translates.
phatsimo says how much a colour shines. In HSB it is measured as the colour’s largest component: bopaMmala(255, 0, 0) and bopaMmala(255, 255, 255) both have full brightness, though they look nothing alike.
It differs from lightness, which reads how close a colour is to white. A full red has full phatsimo but only middling lightness. They are alike and not the same, which is why Bopa keeps both.
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(230, 60, 90);
kwala(phatsimo(mmala));
kwala(lightness(mmala));
tlatsaMmala(mmala);
thalaKhutlonne(40, 40, 140, 120);
tlatsaMmala(phatsimo(mmala) * 2.55);
thalaKhutlonne(220, 40, 140, 120);
}