package giflib

  1. Overview
  2. Docs

Module Giflib.ColorTableSource

Color Table

Represents a color table used in GIF images.

Sourcetype color = int * int * int

Represents a single RGB color, with each component in the range 0–255.

Sourcetype t = color array

A color table is an array of RGB colors.

Sourceval size : 'a array -> int

Returns the number of entries in the color table.

Sourceval create : int -> (int * int * int) array

Creates a color table of the given size, initialized to black

Sourceval get : 'a array -> int -> 'a

Retrieves the color at the specified index in the color table.

Sourceval set : 'a array -> int -> 'a -> unit

Sets the color at the specified index in the color table.

Sourceval of_list : 'a list -> 'a array

Converts a list of colors to a color table array.