package matrix
Build not yet checkedInstall
dune-project
Dependency
Authors
Maintainers
Sources
sha256=a92cbbcbe016fb19fb0a749222da0e459a9567aef3f4c7340d9bd6b71c53ed6f
sha512=6a7ab054605538bb31a2b73a1a6d093981a2704c9f0af5852221c05735290d74aca7c7282298c4d0f91e86a800e2ccd94b4918af883cd963449c758eb6b272b3
doc/matrix.ansi/Ansi/Color/Packed/index.html
Module Color.PackedSource
Colors as immediate integers, for code that stores many colors, such as the planes of a grid.
A packed color is encode c. Its bit layout is private to this module, so code stores and compares packed colors and reads them only with these functions. The module requires a 64-bit platform (Sys.int_size >= 62).
decode p is the color p packs. Bits outside those of a packed color are ignored, and an integer whose intent bits are invalid decodes to default_bg.
red p, green p, blue p and alpha p are the components of the snapshot of p, in [0;255].
red_f p, green_f p, blue_f p and alpha_f p are the components of the snapshot of p, in [0.0;1.0].
indexed_slot p is the palette entry of p when intent p is Indexed _, and meaningless otherwise.
with_alpha p a is p with alpha a, clamped to [0;255], and the same RGB and intent.
blend ~src ~dst is Color.blend ~src ~dst on packed colors. It allocates nothing.
of_rgba_f r g b a is Color.of_rgba_f r g b a packed.