Skip to main content

Function: groupColors()

function groupColors(color, canvasBg): object;

Colours of a TableGroup on a canvas of colour canvasBg: its tint (drawn at low opacity), border (half opacity) and label. A user colour too close to the canvas, such as a dark blue on a dark canvas or a pale yellow on a light one, has its lightness moved until the label reads at 4.5:1, the border at 3:1 and the tint shows; hue and saturation are kept. Colours that are not hex or rgb() are used as given.

Parameters​

color​

string

canvasBg​

string

Returns​

object

fill​

fill: string;

stroke​

stroke: string;

text​

text: string;