[Overview][Constants][Types][Procedures and functions][Index] | Reference for unit 'GraphUtil' (#lcl)

# Reference for unit 'GraphUtil'

Contains routines and types used when drawing graphics.

`uses`
`SysUtils,`
`Types,`
`Math,`
`Graphics,` |  |
`LCLType,` |  | Provides compatibility with the Delphi Windows unit.
`LCLIntf,` |  | Contains WinAPI-like functions for Delphi compatibility.
`GraphType;`

## Overview

graphutil.pp contains routines and types used when drawing graphics. They focus primarily on converting colors and drawing gradients, scroll bars, and arrows.

It includes routines used to convert between both the HSL (hue, saturation, lightness) and HSV (hue, saturation, brightness value) alternative representations of the RGB color model.

HSV models the way different colors mix together, with the saturation dimension resembling various tints of brightly colored paint, and the value dimension resembling the mixture of those paints with varying amounts of black or white paint.

HSL places saturated colors around a circle with a lightness value of 0.5, where a lightness value of 0 or 1 is fully black or white (respectively).

GraphUtil is used in the Lazarus IDE, in LCL WidgetSet components, and optional Lazarus components like FPReport, SynEdit, and TAChart.

graphutil.pp is part of the Lazarus Component Library (LCL).