((section 2 "Outdated egg!" (p "This is an egg for CHICKEN 4, the unsupported old release.  You're almost certainly looking for " (int-link "/eggref/5/allegro" "the CHICKEN 5 version of this egg") ", if it exists.") (p "If it does not exist, there may be equivalent functionality provided by another egg; have a look at the " (link "https://wiki.call-cc.org/chicken-projects/egg-index-5.html" "egg index") ". Otherwise, please consider porting this egg to the current version of CHICKEN.") (tags "allegro" "game")) (section 2 "allegro" (p "This document pertains to color related methods found in the Allegro egg.") (p "Please see the main [allegro] wiki page for more information.") (toc)) (section 2 "Records" (section 3 "color" (def (sig (record "color" (id color)) (procedure "(make-color*)" (id make-color*)) (procedure "(make-color)" (id make-color)) (procedure "(free-color! color)" (id free-color!)) (procedure "(color-red color)" (id color-red)) (procedure "(color-green color)" (id color-green)) (procedure "(color-blue color)" (id color-blue)) (procedure "(color-alpha color)" (id color-alpha)))))) (section 2 "Functions" (section 3 "Color" (def (sig (procedure "(color-addon-version)" (id color-addon-version))) (p "Implements al_get_allegro_color_version.")) (def (sig (procedure "(hsv->rgb (float h) (float s) (float v))" (id hsv->rgb))) (p "Returns a 3-element list consisting of the rgb elements.")) (def (sig (procedure "(rgb->hsl (float red) (float green) (float blue))" (id rgb->hsl))) (p "Returns a 3-element list consisting of the hsl elements.")) (def (sig (procedure "(hsl->rgb (float hue) (float saturation) (float lightness))" (id hsl->rgb))) (p "Returns a 3-element list consisting of the rgb elements.")) (def (sig (procedure "(name->rgb string)" (id name->rgb))) (p "Returns a 3-element list consisting of the rgb elements.")) (def (sig (procedure "(rgb->name (float red) (float green) (float blue))" (id rgb->name))) (p "Returns a string representation of the rgb elements.")) (def (sig (procedure "(cmyk->rgb (float cyan) (float magenta) (float yellow) (float key))" (id cmyk->rgb))) (p "Returns a 3-element list consisting of the rgb elements.")) (def (sig (procedure "(rgb->cmyk (float red) (float green) (float blue))" (id rgb->cmyk))) (p "Returns a 4-element list consisting of the cmyk elements.")) (def (sig (procedure "(yuv->rgb (float y) (float u) (float v))" (id yuv->rgb))) (p "Returns a 3-element list consisting of the rgb elements.")) (def (sig (procedure "(rgb->yuv (float red) (float green) (float blue))" (id rgb->yuv))) (p "Returns a 3-element list consisting of the yuv elements.")) (def (sig (procedure "(rgb->html (float red) (float green) (float blue))" (id rgb->html))) (p "Returns a string consisting of the html representation.")) (def (sig (procedure "(html->rgb string)" (id html->rgb))) (p "Returns a 3-element list consisting of the rgb elements.")) (def (sig (procedure "(make-color-rgb* (integer r) (integer g) (integer b))" (id make-color-rgb*))) (p "Creates a color struct from rgb elements.")) (def (sig (procedure "(make-color-rgb (integer r) (integer g) (integer b))" (id make-color-rgb))) (p "Creates a color struct from rgb elements, with (free-color!) declared as a finalizer.")) (def (sig (procedure "(make-color-rgba*(integer r) (integer g) (integer b) (integer a))" (id make-color-rgba*))) (p "Creates a color struct from rgba elements.")) (def (sig (procedure "(make-color-rgba (integer r) (integer g) (integer b) (integer a))" (id make-color-rgba))) (p "Creates a color struct from rgba elements, with (free-color!) declared as a finalizer.")) (def (sig (procedure "(make-color-yuv* (integer y) (integer u) (integer v))" (id make-color-yuv*))) (p "Creates a color struct from yuv elements.")) (def (sig (procedure "(make-color-yuv (integer y) (integer u) (integer v))" (id make-color-yuv))) (p "Creates a color struct from yuv elements, with (free-color!) declared as a finalizer.")) (def (sig (procedure "(make-color-cmyk* (integer c) (integer m) (integer y) (integer k))" (id make-color-cmyk*))) (p "Creates a color struct from cmyk elements.")) (def (sig (procedure "(make-color-cmyk  (integer c) (integer m) (integer y) (integer k))" (id make-color-cmyk))) (p "Creates a color struct from cmyk elements, with (free-color!) declared as a finalizer.")) (def (sig (procedure "(make-color-hsl*(integer h) (integer s) (integer l))" (id make-color-hsl*))) (p "Creates a color struct from hsl elements.")) (def (sig (procedure "(make-color-hsl  (integer h) (integer s) (integer l))" (id make-color-hsl))) (p "Creates a color struct from hsl elements, with (free-color!) declared as a finalizer.")) (def (sig (procedure "(make-color-hsv*(integer h) (integer s) (integer v))" (id make-color-hsv*))) (p "Creates a color struct from hsv elements.")) (def (sig (procedure "(make-color-hsv  (integer h) (integer s) (integer v))" (id make-color-hsv))) (p "Creates a color struct from hsv elements, with (free-color!) declared as a finalizer.")) (def (sig (procedure "(make-color-name* string)" (id make-color-name*))) (p "Creates a color struct from a string name.")) (def (sig (procedure "(make-color-name string)" (id make-color-name))) (p "Creates a color struct from a string name, with (free-color!) declared as a finalizer.")) (def (sig (procedure "(make-color-html* string)" (id make-color-html*))) (p "Creates a color struct from a html representation.")) (def (sig (procedure "(make-color-html string)" (id make-color-html))) (p "Creates a color struct from a html representation, with (free-color!) declared as a finalizer.")) (def (sig (procedure "(color-yuv! color (float y) (float u) (float v))" (id color-yuv!))) (p "Maps yuv elements to a color struct.")) (def (sig (procedure "(color-cmyk! color (float c) (float m) (float y) (float k))" (id color-cmyk!))) (p "Maps cmyk elements to a color struct.")) (def (sig (procedure "(color-hsl! color (float h) (float s) (float l))" (id color-hsl!))) (p "Maps hsl elements to a color struct.")) (def (sig (procedure "(color-hsv! color (float h) (float s) (float v))" (id color-hsv!))) (p "Maps hsv elements to a color struct.")) (def (sig (procedure "(color-name! color string)" (id color-name!))) (p "Maps a color name to a color struct.")) (def (sig (procedure "(color-html! color string)" (id color-html!))) (p "Maps a html representation to a color struct.")))))