prizm-3.0.0: Convert colors to different color spaces, interpolate colors, and transform colors

Copyright(C) 2017 Parnell Springmeyer
LicenseBSD3
MaintainerParnell Springmeyer <parnell@digitalmentat.com>
Stabilitystable
Safe HaskellSafe
LanguageHaskell2010

Data.Prizm.Color.RGB.Types

Description

 

Synopsis

Documentation

clamp :: Integral a => a -> a Source #

Clamp a Word8 with an upper-bound of 255 and a lower-bound of 0.

newtype RGB Source #

A color in the 256-cubed RGB color space.

Constructors

RGB 

Instances

Eq RGB Source # 

Methods

(==) :: RGB -> RGB -> Bool #

(/=) :: RGB -> RGB -> Bool #

Ord RGB Source # 

Methods

compare :: RGB -> RGB -> Ordering #

(<) :: RGB -> RGB -> Bool #

(<=) :: RGB -> RGB -> Bool #

(>) :: RGB -> RGB -> Bool #

(>=) :: RGB -> RGB -> Bool #

max :: RGB -> RGB -> RGB #

min :: RGB -> RGB -> RGB #

Show RGB Source # 

Methods

showsPrec :: Int -> RGB -> ShowS #

show :: RGB -> String #

showList :: [RGB] -> ShowS #

PresetColor RGB Source # 

mkRGB Source #

Arguments

:: Int

Red color channel

-> Int

Green color channel

-> Int

Blue color channel

-> RGB 

Produce a 256-cubed RGB color.

NB: this function clamps each argument to the 0-255 range.