allegro

This document pertains to color related methods found in the Allegro egg.

Please see the main [allegro] wiki page for more information.

  1. allegro
  2. Records
    1. color
  3. Functions
    1. Color

Records

color

[record] color
[procedure] (make-color*)
[procedure] (make-color)
[procedure] (free-color! color)
[procedure] (color-red color)
[procedure] (color-green color)
[procedure] (color-blue color)
[procedure] (color-alpha color)

Functions

Color

[procedure] (color-addon-version)

Implements al_get_allegro_color_version.

[procedure] (hsv->rgb (float h) (float s) (float v))

Returns a 3-element list consisting of the rgb elements.

[procedure] (rgb->hsl (float red) (float green) (float blue))

Returns a 3-element list consisting of the hsl elements.

[procedure] (hsl->rgb (float hue) (float saturation) (float lightness))

Returns a 3-element list consisting of the rgb elements.

[procedure] (name->rgb string)

Returns a 3-element list consisting of the rgb elements.

[procedure] (rgb->name (float red) (float green) (float blue))

Returns a string representation of the rgb elements.

[procedure] (cmyk->rgb (float cyan) (float magenta) (float yellow) (float key))

Returns a 3-element list consisting of the rgb elements.

[procedure] (rgb->cmyk (float red) (float green) (float blue))

Returns a 4-element list consisting of the cmyk elements.

[procedure] (yuv->rgb (float y) (float u) (float v))

Returns a 3-element list consisting of the rgb elements.

[procedure] (rgb->yuv (float red) (float green) (float blue))

Returns a 3-element list consisting of the yuv elements.

[procedure] (rgb->html (float red) (float green) (float blue))

Returns a string consisting of the html representation.

[procedure] (html->rgb string)

Returns a 3-element list consisting of the rgb elements.

[procedure] (make-color-rgb* (integer r) (integer g) (integer b))

Creates a color struct from rgb elements.

[procedure] (make-color-rgb (integer r) (integer g) (integer b))

Creates a color struct from rgb elements, with (free-color!) declared as a finalizer.

[procedure] (make-color-rgba*(integer r) (integer g) (integer b) (integer a))

Creates a color struct from rgba elements.

[procedure] (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.

[procedure] (make-color-yuv* (integer y) (integer u) (integer v))

Creates a color struct from yuv elements.

[procedure] (make-color-yuv (integer y) (integer u) (integer v))

Creates a color struct from yuv elements, with (free-color!) declared as a finalizer.

[procedure] (make-color-cmyk* (integer c) (integer m) (integer y) (integer k))

Creates a color struct from cmyk elements.

[procedure] (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.

[procedure] (make-color-hsl*(integer h) (integer s) (integer l))

Creates a color struct from hsl elements.

[procedure] (make-color-hsl (integer h) (integer s) (integer l))

Creates a color struct from hsl elements, with (free-color!) declared as a finalizer.

[procedure] (make-color-hsv*(integer h) (integer s) (integer v))

Creates a color struct from hsv elements.

[procedure] (make-color-hsv (integer h) (integer s) (integer v))

Creates a color struct from hsv elements, with (free-color!) declared as a finalizer.

[procedure] (make-color-name* string)

Creates a color struct from a string name.

[procedure] (make-color-name string)

Creates a color struct from a string name, with (free-color!) declared as a finalizer.

[procedure] (make-color-html* string)

Creates a color struct from a html representation.

[procedure] (make-color-html string)

Creates a color struct from a html representation, with (free-color!) declared as a finalizer.

[procedure] (color-yuv! color (float y) (float u) (float v))

Maps yuv elements to a color struct.

[procedure] (color-cmyk! color (float c) (float m) (float y) (float k))

Maps cmyk elements to a color struct.

[procedure] (color-hsl! color (float h) (float s) (float l))

Maps hsl elements to a color struct.

[procedure] (color-hsv! color (float h) (float s) (float v))

Maps hsv elements to a color struct.

[procedure] (color-name! color string)

Maps a color name to a color struct.

[procedure] (color-html! color string)

Maps a html representation to a color struct.