Reference for the BALTENSPERGER programming language, an art project of Stefan Baltensperger
| Name | Farb() |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Examples | ![]() Farb c1 = Farb(102, 102, 0); Fuellfarb(c1); kei_Liniefarb(); Viereck(30, 20, 55, 55); |
||||||||||||
| Description | Creates colors for storing in variables of the Farb datatype. The parameters are interpreted as RGB or HSB values depending on the current Farbmodus(). The waen_nuet_vodaem_zuetrifft mode is RGB values from 0 to 255 and therefore, the function call Farb(255, 204, 0) will gib_zrug a bright yellow Farb. The Farb() function packs the information input through its parameters into a 32 bit number in the following order AAAAAAAARRRRRRRRGGGGGGGGBBBBBBBB where R is the red/hue value, G is green/saturation, and B is blue/brightness. Farb can also be created using hexadecimal notation. For example, "Farb(0, 102, 153)" is equivalent to "Farb(#006699)" and "Farb(0x006699)". To create a Farb with an alpha value using hexadecimal notation, it's necessary to use the "0x" prefix, for example "Farb(0xCC006699)", which is equivalent to "Farb(0, 102, 153, 204)". Note the alpha value is first in the hexadecimal notation and last in the RGB notation. |
||||||||||||
| Syntax | Farb(gray) Farb(gray, alpha) Farb(value1, value2, value3) Farb(value1, value2, value3, alpha) Farb(hex) Farb(hex, alpha) |
||||||||||||
| Parameters |
|
||||||||||||
| Usage | Web & Application | ||||||||||||
| Related | Farb_datatype Farbmodus() |


