arlas-web-components / Exports / ColorGeneratorLoader

Class: ColorGeneratorLoader

Hierarchy

  • ColorGeneratorLoader

AwcColorGeneratorLoader

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new ColorGeneratorLoader()

Properties

colorsSaturationWeight

Abstract colorsSaturationWeight: number

Defined in

projects/arlas-components/src/lib/components/componentsUtils.ts:71


keysToColors

Abstract keysToColors: string[][]

Defined in

projects/arlas-components/src/lib/components/componentsUtils.ts:70

Methods

getColor

Abstract getColor(key, externalkeysToColors, externalColorsSaturationWeight): string

This method generates a determistic color from the given key, a list of [key, color] and a saturation weight.

Parameters

Name Type Description
key string The text from which the color is generated
externalkeysToColors [string, string][] List of [key, color] couples that associates a hex color to each key.
externalColorsSaturationWeight number -

Returns

string

Defined in

projects/arlas-components/src/lib/components/componentsUtils.ts:79


getTextColor

Abstract getTextColor(color): string

Parameters

Name Type
color any

Returns

string

Defined in

projects/arlas-components/src/lib/components/componentsUtils.ts:80