reduceExample :: IO ()
reduceExample = do
  for_ [0..255] $ \c -> do
    flip evalStateT (hDefaultStyle stdout Term256) $ withStyle [BgColor $ Color256 c] $ liftIO $ printf "%02x" c
    flip evalStateT (hDefaultStyle stdout Term8)   $ withStyle [BgColor $ Color256 c] $ liftIO $ printf "%02x" c
    liftIO $ putChar '\n'
  for_ [0,64..255] $ \r ->
    for_ [0,64..255] $ \g ->
      for_ [0,64..255] $ \b -> do
        let c = RGB r g b
        flip evalStateT (hDefaultStyle stdout TermRGB) $ withStyle [BgColor c] $ liftIO $ printf "%20s" $ show c
        flip evalStateT (hDefaultStyle stdout Term256) $ withStyle [BgColor c] $ liftIO $ printf "%20s" $ show c
        flip evalStateT (hDefaultStyle stdout Term8)   $ withStyle [BgColor c] $ liftIO $ printf "%20s" $ show c
        liftIO $ putChar '\n'
reduceExample :: IO ()
reduceExample = do
  for_ [0..255] $ \c -> do
    flip evalStateT (hDefaultStyle stdout Term256) $ withStyle [BgColor $ Color256 c] $ liftIO $ printf "%02x" c
    flip evalStateT (hDefaultStyle stdout Term8)   $ withStyle [BgColor $ Color256 c] $ liftIO $ printf "%02x" c
    liftIO $ putChar '\n'
  for_ [0,64..255] $ \r ->
    for_ [0,64..255] $ \g ->
      for_ [0,64..255] $ \b -> do
        let c = RGB r g b
        flip evalStateT (hDefaultStyle stdout TermRGB) $ withStyle [BgColor c] $ liftIO $ printf "%20s" $ show c
        flip evalStateT (hDefaultStyle stdout Term256) $ withStyle [BgColor c] $ liftIO $ printf "%20s" $ show c
        flip evalStateT (hDefaultStyle stdout Term8)   $ withStyle [BgColor c] $ liftIO $ printf "%20s" $ show c
        liftIO $ putChar '\n'
reduceExample = do
  for_ [0..255] $ \c -> do
    flip evalStateT (hDefaultStyle stdout Term256) $ withStyle [BgColor $ Color256 c] $ liftIO $ printf "%02x" c
    flip evalStateT (hDefaultStyle stdout Term8)   $ withStyle [BgColor $ Color256 c] $ liftIO $ printf "%02x" c
    liftIO $ putChar '\n'
  for_ [0,64..255] $ \r ->
    for_ [0,64..255] $ \g ->
      for_ [0,64..255] $ \b -> do
        let c = RGB r g b
        flip evalStateT (hDefaultStyle stdout TermRGB) $ withStyle [BgColor c] $ liftIO $ printf "%20s" $ show c
        flip evalStateT (hDefaultStyle stdout Term256) $ withStyle [BgColor c] $ liftIO $ printf "%20s" $ show c
        flip evalStateT (hDefaultStyle stdout Term8)   $ withStyle [BgColor c] $ liftIO $ printf "%20s" $ show c
        liftIO $ putChar '\n'