## rgb8.api
#
# X server format 8-bit-per-component 24-bit int RGB values.
# Compiled by:
#
src/lib/x-kit/xclient/xclient-internals.sublib# This api is implemented in:
#
#
src/lib/x-kit/xclient/src/color/rgb8.pkg api Rgb8 {
Rgb8;
rgb8_to_floats: Rgb8 -> (Float, Float, Float);
rgb8_from_floats: (Float, Float, Float) -> Rgb8;
#
# Here we think in terms of three color components
# ranging from 0.0 -> 1.0 inclusive.
rgb8_to_rgb: Rgb8 -> rgb::Rgb;
rgb8_from_rgb: rgb::Rgb -> Rgb8;
#
# Rgb is our principal color representation.
# Internally it uses threefloats ranging
# from 0.0 -> 1.0.
rgb8_to_ints: Rgb8 -> (Int, Int, Int);
rgb8_from_ints: (Int, Int, Int) -> Rgb8;
#
# Here we think in terms of three color
# components ranging from 0 -> 255 inclusive.
rgb8_from_int: Int -> Rgb8;
rgb8_to_int: Rgb8 -> Int;
#
# Here we think in terms of a single
# 24-bit RGB color value, where
# black = 0x000000
# red = 0xFF0000
# green = 0x00FF00
# blue = 0x0000FF
# white = 0xFFFFFF
# This is the usual format for pixels
# in modern X visuals.
same_rgb8: (Rgb8, Rgb8) -> Bool;
rgb8_from_name: String -> Rgb8; # Raises exception lib_base::NOT_FOUND if given string is not in table.
#
# Return a color from x11_color_name::x11_colors table.
# Predefine some colors for convenience:
#
rgb8_color0: Rgb8; # At present we need these irritating rgb8_* prefixes because
rgb8_color1: Rgb8; #
rgb8_white: Rgb8; #
src/lib/x-kit/xclient/xclient.pkg rgb8_black: Rgb8; #
rgb8_red: Rgb8; # dumps rgb.pkg and reg8.pkg into the same namespace. :-( XXX SUCKO FIXME.
rgb8_green: Rgb8;
rgb8_blue: Rgb8;
rgb8_cyan: Rgb8;
rgb8_magenta: Rgb8;
rgb8_yellow: Rgb8;
};
## COPYRIGHT (c) 1994 by AT&T Bell Laboratories
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.