im.im_palette

\file \brief Palette Generators

See Copyright Notice in im_lib.h

Members

Functions

imPaletteBlackBody
c_long* imPaletteBlackBody()

Creates a palette of a gradient from black to white passing trough red and yellow. * * \verbatim im.PaletteBlackBody() -> pal: imPalette [in Lua 5] \endverbatim * \ingroup palette

imPaletteBlue
c_long* imPaletteBlue()

Creates a palette of a gradient of blue colors. * The colors are arranged from black to pure blue. * * \verbatim im.PaletteBlue() -> pal: imPalette [in Lua 5] \endverbatim * \ingroup palette

imPaletteBlueIce
c_long* imPaletteBlueIce()

Creates a palette of a gradient of blue colors. * The colors are arranged from pure blue to white. * * \verbatim im.PaletteBlueIce() -> pal: imPalette [in Lua 5] \endverbatim * \ingroup palette

imPaletteCian
c_long* imPaletteCian()

Creates a palette of a gradient of cian colors. * The colors are arranged from black to pure cian. * * \verbatim im.PaletteCian() -> pal: imPalette [in Lua 5] \endverbatim * \ingroup palette

imPaletteDuplicate
c_long* imPaletteDuplicate(const(c_long)* palette, int count)

Duplicate a palette data using imPaletteNew. * \ingroup palette

imPaletteFindColor
int imPaletteFindColor(const(c_long)* palette, int palette_count, c_long color, ubyte tol)

Searches for the color on the table and returns the color index if successful. * If the tolerance is 0 search for the exact match in the palette else search for the * first color that fits in the tolerance range. * See also \ref colorutl. * * \verbatim im.PaletteFindColor(pal: imPalette, color: lightuserdata, tol: number) -> index: number [in Lua 5] \endverbatim * \ingroup palette

imPaletteFindNearest
int imPaletteFindNearest(const(c_long)* palette, int palette_count, c_long color)

Searches for the nearest color on the table and returns the color index if successful. * It looks in all palette entries and finds the minimum euclidian square distance. * If the color matches the given color it returns immediately. * See also \ref colorutl. * * \verbatim im.PaletteFindNearest(pal: imPalette, color: lightuserdata) -> index: number [in Lua 5] \endverbatim * \ingroup palette

imPaletteGray
c_long* imPaletteGray()

Creates a palette of gray scale values. * The colors are arranged from black to white. * * \verbatim im.PaletteGray() -> pal: imPalette [in Lua 5] \endverbatim * \ingroup palette

imPaletteGreen
c_long* imPaletteGreen()

Creates a palette of a gradient of green colors. * The colors are arranged from black to pure green. * * \verbatim im.PaletteGreen() -> pal: imPalette [in Lua 5] \endverbatim * \ingroup palette

imPaletteHighContrast
c_long* imPaletteHighContrast()

Creates a palette with high contrast colors. * * \verbatim im.PaletteHighContrast() -> pal: imPalette [in Lua 5] \endverbatim * \ingroup palette

imPaletteHotIron
c_long* imPaletteHotIron()

Creates a palette of a gradient from black to white passing trough red and orange. * * \verbatim im.PaletteHotIron() -> pal: imPalette [in Lua 5] \endverbatim * \ingroup palette

imPaletteHues
c_long* imPaletteHues()

Creates a palette of hues with maximum saturation. * * \verbatim im.PaletteHues() -> pal: imPalette [in Lua 5] \endverbatim * \ingroup palette

imPaletteLinear
c_long* imPaletteLinear()

Creates a palette of a sequence of colors from black to white * with 32 linear intensity values combined with 8 hue variations. * * \verbatim im.PaletteLinear() -> pal: imPalette [in Lua 5] \endverbatim * \ingroup palette

imPaletteMagenta
c_long* imPaletteMagenta()

Creates a palette of a gradient of magenta colors. * The colors are arranged from black to pure magenta. * * \verbatim im.PaletteMagenta() -> pal: imPalette [in Lua 5] \endverbatim * \ingroup palette

imPaletteNew
c_long* imPaletteNew(int count)

Allocates memory for the palette data. * This ensures allocation and release in the same module by the correct functions. * \ingroup palette

imPaletteRainbow
c_long* imPaletteRainbow()

Creates a palette of rainbow colors. * The colors are arranged in the light wave length spectrum order (starting from purple). * * \verbatim im.PaletteRainbow() -> pal: imPalette [in Lua 5] \endverbatim * \ingroup palette

imPaletteRed
c_long* imPaletteRed()

Creates a palette of a gradient of red colors. * The colors are arranged from black to pure red. * * \verbatim im.PaletteRed() -> pal: imPalette [in Lua 5] \endverbatim * \ingroup palette

imPaletteRelease
void imPaletteRelease(c_long* palette)

Releases memory for the palette data. * This ensures allocation and release in the same module by the correct functions. * \ingroup palette

imPaletteUniform
c_long* imPaletteUniform()

Creates a palette of an uniform sub-division of colors from black to white. This is a 2^(2.6) bits per pixel palette. * \verbatim im.PaletteUniform() -> pal: imPalette [in Lua 5] \endverbatim \ingroup palette

imPaletteUniformIndex
int imPaletteUniformIndex(c_long color)

Returns the index of the correspondent RGB color of an uniform palette. * * \verbatim im.PaletteUniformIndex(color: lightuserdata) -> index: number [in Lua 5] \endverbatim * \ingroup palette

imPaletteUniformIndexHalftoned
int imPaletteUniformIndexHalftoned(c_long color, int x, int y)

Returns the index of the correspondent RGB color of an uniform palette. * Uses an 8x8 ordered dither to lookup the index in a halftone matrix. * The spatial position used by the halftone method. * * \verbatim im.PaletteUniformIndexHalftoned(color: lightuserdata, x: number, y: number) -> index: number [in Lua 5] \endverbatim * \ingroup palette

imPaletteYellow
c_long* imPaletteYellow()

Creates a palette of a gradient of yellow colors. * The colors are arranged from black to pure yellow. * * \verbatim im.PaletteYellow() -> pal: imPalette [in Lua 5] \endverbatim * \ingroup palette

Meta