jLM.ColorGen#

Defines ColorSeq, the color scheme generator

Classes

ColorGen([hue])

Distinct color generator

class jLM.ColorGen.ColorGen(hue=0.5)[source]#

Bases: object

Distinct color generator

Distinct color generator

Parameters:

hue (float) – Initial hue

float(idx)[source]#

Get a RGB triple by index

Parameters:

idx (int) – Color index

Returns:

Rgb triple

Return type:

(float,float,float)

floatFg(idx)[source]#

Get an appropriate foreground color for a color index as a RGB triple

Parameters:

idx (int) – Color index

Returns:

Rgb triple

Return type:

(float,float,float)

str(idx)[source]#

Get a hex string by index

Parameters:

idx (int) – Color index

Returns:

Hex string

Return type:

str

strFg(idx)[source]#

Get an appropriate foreground color for a color index as a hex string

Parameters:

idx (int) – Color index

Returns:

Hex string

Return type:

str