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