[[tags: allegro game]]
== allegro
This document pertains to color related methods found in the Allegro egg.
Please see the main [allegro] wiki page for more information.
[[toc:]]
== Records
=== color
color
(make-color*)
(make-color)
(free-color! color)
(color-red color)
(color-green color)
(color-blue color)
(color-alpha color)
== Functions
=== Color
(color-addon-version)
Implements al_get_allegro_color_version.
(hsv->rgb (float h) (float s) (float v))
Returns a 3-element list consisting of the rgb elements.
(rgb->hsl (float red) (float green) (float blue))
Returns a 3-element list consisting of the hsl elements.
(hsl->rgb (float hue) (float saturation) (float lightness))
Returns a 3-element list consisting of the rgb elements.
(name->rgb string)
Returns a 3-element list consisting of the rgb elements.
(rgb->name (float red) (float green) (float blue))
Returns a string representation of the rgb elements.
(cmyk->rgb (float cyan) (float magenta) (float yellow) (float key))
Returns a 3-element list consisting of the rgb elements.
(rgb->cmyk (float red) (float green) (float blue))
Returns a 4-element list consisting of the cmyk elements.
(yuv->rgb (float y) (float u) (float v))
Returns a 3-element list consisting of the rgb elements.
(rgb->yuv (float red) (float green) (float blue))
Returns a 3-element list consisting of the yuv elements.
(rgb->html (float red) (float green) (float blue))
Returns a string consisting of the html representation.
(html->rgb string)
Returns a 3-element list consisting of the rgb elements.
(make-color-rgb* (integer r) (integer g) (integer b))
Creates a color struct from rgb elements.
(make-color-rgb (integer r) (integer g) (integer b))
Creates a color struct from rgb elements, with (free-color!) declared as a finalizer.
(make-color-rgba*(integer r) (integer g) (integer b) (integer a))
Creates a color struct from rgba elements.
(make-color-rgba (integer r) (integer g) (integer b) (integer a))
Creates a color struct from rgba elements, with (free-color!) declared as a finalizer.
(make-color-yuv* (integer y) (integer u) (integer v))
Creates a color struct from yuv elements.
(make-color-yuv (integer y) (integer u) (integer v))
Creates a color struct from yuv elements, with (free-color!) declared as a finalizer.
(make-color-cmyk* (integer c) (integer m) (integer y) (integer k))
Creates a color struct from cmyk elements.
(make-color-cmyk (integer c) (integer m) (integer y) (integer k))
Creates a color struct from cmyk elements, with (free-color!) declared as a finalizer.
(make-color-hsl*(integer h) (integer s) (integer l))
Creates a color struct from hsl elements.
(make-color-hsl (integer h) (integer s) (integer l))
Creates a color struct from hsl elements, with (free-color!) declared as a finalizer.
(make-color-hsv*(integer h) (integer s) (integer v))
Creates a color struct from hsv elements.
(make-color-hsv (integer h) (integer s) (integer v))
Creates a color struct from hsv elements, with (free-color!) declared as a finalizer.
(make-color-name* string)
Creates a color struct from a string name.
(make-color-name string)
Creates a color struct from a string name, with (free-color!) declared as a finalizer.
(make-color-html* string)
Creates a color struct from a html representation.
(make-color-html string)
Creates a color struct from a html representation, with (free-color!) declared as a finalizer.
(color-yuv! color (float y) (float u) (float v))
Maps yuv elements to a color struct.
(color-cmyk! color (float c) (float m) (float y) (float k))
Maps cmyk elements to a color struct.
(color-hsl! color (float h) (float s) (float l))
Maps hsl elements to a color struct.
(color-hsv! color (float h) (float s) (float v))
Maps hsv elements to a color struct.
(color-name! color string)
Maps a color name to a color struct.
(color-html! color string)
Maps a html representation to a color struct.