package bimage

  1. Overview
  2. Docs

Color contains methods for creating and inspecting color types

type t = [
  1. | `Rgb
]
val t : t

Color type value

val name : t -> string

Color name

val channels : t -> int

Returns the number of channels

val has_alpha : t -> bool

Returns true when a color has an alpha channel, which will always be the last channel

val to_rgb : t -> floatarray -> floatarray

Convert a color to RGB

val of_rgb : t -> floatarray -> floatarray

Convert a color from RGB

OCaml

Innovation. Community. Security.