UISF-0.4.0.0: Library for Arrowized Graphical User Interfaces.

Copyright(c) Daniel Winograd-Cort 2015
Licensesee the LICENSE file in the distribution
Maintainerdwc@cs.yale.edu
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell98

FRP.UISF.Graphics.Color

Description

 

Synopsis

Documentation

data Color Source

We provide a data type for colors to allow users to easily and clearly specify common colors. Primary and secondary RGB colors are represented along with a few beige colors for use in many GUI elements.

Constructors

Black 
Blue 
Green 
Cyan 
Red 
Magenta 
Yellow 
White 
Gray 
VLightBeige 
LightBeige

This is the default background color for the UI window.

MediumBeige 
DarkBeige 

data RGB Source

RGB can be used to specify colors more precisely. Create them with one of the two smart constructors rgb or rgbE.

Instances

colorToRGB :: Color -> RGB Source

Generally used as an internal function for converting Color to RGB, but can be used by anyone.

rgb :: (Integral r, Integral g, Integral b) => r -> g -> b -> Maybe RGB Source

This function takes three integral values between 0 and 255 inclusive and create an RGB value with them. If any of the values fall outside the acceptable range, Nothing is returned.

rgbE :: (Integral r, Integral g, Integral b, Show r, Show g, Show b) => r -> g -> b -> RGB Source

This is a version of rgb that throws an error when a given value falls outside the acceptable 0-255 range. The error message shows the bad input, so the extra Show constraint is necessary.

extractRGB :: (Integral r, Integral g, Integral b) => RGB -> (r, g, b) Source

Use this to extract the values from an RGB color.