hledger-lib
Safe HaskellNone
LanguageGHC2021

Hledger.Write.Chart.Palette

Description

The exact colours of chart series, shared by the chart renderers (SVG, and text in terminals with 24-bit colour), so that charts look the same everywhere.

The categorical palette and chart colours are the dataviz skill's validated reference palette (8 slots, light and dark variants); the account type colours were chosen from it and validated on the pairs that appear together (assets-liabilities-equity, revenues-expenses).

Synopsis

Documentation

colourHex :: Bool -> Colour -> Text Source #

A chart colour as #rrggbb, in its light variant (for light backgrounds) or its dark variant (for dark backgrounds).

tint :: Double -> Text -> Text Source #

Mix a #rrggbb colour with white (by a positive fraction) or black (by a negative fraction).