Skip to content

arlas-web-components / Exports / ColorGeneratorLoader

Class: ColorGeneratorLoader

Hierarchy

  • ColorGeneratorLoader

AwcColorGeneratorLoader

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new ColorGeneratorLoader()

Properties

changekeysToColors$

Abstract changekeysToColors$: Observable<void>

Defined in

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


colorsSaturationWeight

Abstract colorsSaturationWeight: number

Defined in

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


keysToColors

Abstract keysToColors: [string, string][]

Defined in

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

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:81


getTextColor

Abstract getTextColor(color): string

Parameters

Name Type
color any

Returns

string

Defined in

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