{-# LANGUAGE NoImplicitPrelude #-} module Imj.Graphics.Color ( -- * 8-bits colors {- | There are . Here, we support 8-bit colors. 8-bit colors have 6*6*6 = 216 rgb colors, 24 grays and are represented by 'Color8'. You can create a 'Color8' ny using 'rgb' or 'gray'. It is possible to /interpolate/ between two colors in RGB space using the 'DiscreteInterpolation' instance of 'Color8'. We also have 'LayeredColor' because when drawing in the terminal, we can change both the 'Background' and the 'Foreground' color. -} Color8 -- constructor is intentionaly not exposed. -- ** Create a single color , rgb , gray -- ** Create a LayeredColor , LayeredColor(..) , Background , Foreground , onBlack , whiteOnBlack -- ** Predefined colors , white, black, red, green, magenta, cyan, yellow, blue ) where import Imj.Graphics.Color.Types -- For reference: {- import Imj.Prelude -- | How -- xtermMapRGB8bitComponent :: Word8 -- ^ input values are in -- -> Word8 -- ^ output is in range [0..255] xtermMapRGB8bitComponent 0 = 0 xtermMapRGB8bitComponent n = 55 + n * 40 -- | How -- xtermMapGray8bitComponent :: Word8 -- ^ input values are in -- -> Word8 -- ^ output is in range [0..255] xtermMapGray8bitComponent v = 8 + 10 * v -}