by Andrea AmantiniJul 25 2019

Haskell Template

import IHaskell.Display 

html "<h1>Haskell 💖</h1>"
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
import IHaskell.Display.Juicypixels
import Codec.Picture
renderer :: Int -> Int -> PixelRGB8
renderer x y =
  let (q, r) = x `quotRem` max 10 y
      s = fromIntegral . min 0xff
  in PixelRGB8 (s q) (s r) (s (q + r))
  
generateImage renderer 800 300