tryAllocColor :: (FudgetIO c) => ColormapId -> RGB -> (Maybe Color -> c a b) -> c a b tryAllocColorF :: ColormapId -> RGB -> Cont (F a b) (Maybe Color) allocColor :: (FudgetIO c) => ColormapId -> RGB -> Cont (c a b) Color allocColorF :: ColormapId -> RGB -> Cont (F a b) Color allocColorPixel :: (FudgetIO c) => ColormapId -> RGB -> Cont (c a b) Pixel allocColorPixelF :: ColormapId -> RGB -> Cont (F a b) Pixel tryAllocNamedColor :: (FudgetIO c) => ColormapId -> ColorName -> (Maybe Color -> c a b) -> c a b tryAllocNamedColorF :: ColormapId -> ColorName -> Cont (F a b) (Maybe Color) allocNamedColor :: (FudgetIO c) => ColormapId -> ColorName -> Cont (c a b) Color allocNamedColorF :: ColormapId -> ColorName -> Cont (F a b) Color allocNamedColorPixel :: (FudgetIO c) => ColormapId -> ColorName -> Cont (c a b) Pixel allocNamedColorPixelF :: ColormapId -> ColorName -> Cont (F a b) Pixel allocNamedColorDef :: (FudgetIO c) => ColormapId -> ColorName -> [Char] -> Cont (c a b) Color allocNamedColorDefPixel :: (FudgetIO c) => ColormapId -> ColorName -> [Char] -> (Pixel -> c a b) -> c a b
tryAllocColor colormap rgb colkernel
data RGB = RGB Int Int Int
data Color = Color Pixel RGB
data Pixel = Pixel Int
The functions whose names do not begin with try
abort the program
with an error message, if the allocation fails.
allocNamedColorDef
and allocNamedColorDefPixel
first tries to
allocate one color. If that fails it outputs a warning message on the standard
error channel and tries a fallback color.
colormap :: ColormapId
defaultColormap
is the only supported colormap in the current implementation.
rgb :: RGB
colkernel :: Maybe Color -> c a b
Maybe Color
value.