@@ -140,16 +140,16 @@ chart pct = do
140 quarters = fst <$> heights
140 quarters = fst <$> heights
141 eighths = snd <$> heights
141 eighths = snd <$> heights
142 eighthRow = ffor eighths $ \x -> if x == 0 then 0 else 1
142 eighthRow = ffor eighths $ \x -> if x == 0 then 0 else 1
143− tile (fixed eighthRow) $ fill' (current $ eighthBlocks <$> eighths) $ current $
143+ grout (fixed eighthRow) $ fill' (current $ eighthBlocks <$> eighths) $ current $
144 ffor quarters $ \q ->
144 ffor quarters $ \q ->
145 if | _quarter_fourth q > 0 -> red
145 if | _quarter_fourth q > 0 -> red
146 | _quarter_third q > 0 -> orange
146 | _quarter_third q > 0 -> orange
147 | _quarter_second q > 0 -> yellow
147 | _quarter_second q > 0 -> yellow
148 | otherwise -> white
148 | otherwise -> white
149− tile (fixed $ _quarter_fourth <$> quarters) $ fill' (pure '█') (pure red)
149+ grout (fixed $ _quarter_fourth <$> quarters) $ fill' (pure '█') (pure red)
150− tile (fixed $ _quarter_third <$> quarters) $ fill' (pure '█') (pure orange)
150+ grout (fixed $ _quarter_third <$> quarters) $ fill' (pure '█') (pure orange)
151− tile (fixed $ _quarter_second <$> quarters) $ fill' (pure '█') (pure yellow)
151+ grout (fixed $ _quarter_second <$> quarters) $ fill' (pure '█') (pure yellow)
152− tile (fixed $ _quarter_first <$> quarters) $ fill' (pure '█') (pure white)
152+ grout (fixed $ _quarter_first <$> quarters) $ fill' (pure '█') (pure white)
154 -- Calculate number of full rows, height of partial row
154 -- Calculate number of full rows, height of partial row
155 calcRowHeights :: Int -> Ratio Word64 -> (Quarter Int, Int)
155 calcRowHeights :: Int -> Ratio Word64 -> (Quarter Int, Int)
@@ -176,10 +176,12 @@ chart pct = do
178 tellImages fillImg
178 tellImages fillImg
179+ color :: Int -> Int -> Int -> V.Color
179− red = V.withForeColor V.defAttr $ V.rgbColor 255 0 0
181+ red = V.withForeColor V.defAttr $ color 255 0 0
180− orange = V.withForeColor V.defAttr $ V.rgbColor 255 165 0
182+ orange = V.withForeColor V.defAttr $ color 255 165 0
181− yellow = V.withForeColor V.defAttr $ V.rgbColor 255 255 0
183+ yellow = V.withForeColor V.defAttr $ color 255 255 0
182− white = V.withForeColor V.defAttr $ V.rgbColor 255 255 255
184+ white = V.withForeColor V.defAttr $ color 255 255 255
184data Quarter a = Quarter
186data Quarter a = Quarter
185 { _quarter_first :: a
187 { _quarter_first :: a