Reference for the BALTENSPERGER programming language, an art project of Stefan Baltensperger

Name

Farb

Examples
example pic
Farb c1 = Farb(204, 153, 0);
Farb c2 = #FFCC00;
kei_Liniefarb();
Fuellfarb(c1);
Viereck(0, 0, 25, 100);
Fuellfarb(c2);
Viereck(25, 0, 25, 100);
Farb c3 = farb_vom_Pixel(10, 50);
Fuellfarb(c3);
Viereck(50, 0, 50, 100);
Description Datatype for storing Farb values. Colors may be assigned with farb_vom_Pixel() and Farb() or they may be specified directly using hexadecimal notation such as #FFCC00.

Using schrib() or schrib_uf_e_neui_Linie() on a Farb will produce strange results (usually negative numbers) because of the way colors are stored in memory. A better method is to use the hexWaert() function to format the Farb data, or use the rot(), grueen(), and blau() functions to get individual values and prGanzizahl those.

From a technical standpoint, colors are 32 bits of information ordered as AAAAAAAARRRRRRRRGGGGGGGGBBBBBBBB where the A's contain the alpha value, the R's are the red/hue value, G's are green/saturation, and B's are blue/brightness.
Syntax
Farb var
Farb var = Farb value
Parameters
var variable name referencing the value
Farb value any Farb value
Usage Web & Application
Related Farbmodus()
Farb()
hexWaert()
rot()
grueen()
blau()
Stefan Baltensperger 2009

Creative Commons License