Skip to content

arlas-web-components > "components/componentsUtils" > ColorGeneratorLoader

Class: ColorGeneratorLoader

Hierarchy

ColorGeneratorLoader

AwcColorGeneratorLoader

Index

Properties

Methods


Properties

<Abstract> colorsSaturationWeight

● colorsSaturationWeight: number

Defined in components/componentsUtils.ts:32


<Abstract> keysToColors

● keysToColors: Array<Array<string>>

Defined in components/componentsUtils.ts:31


Methods

<Abstract> getColor

getColor(key: string, externalkeysToColors: Array<[string, string]>, externalColorsSaturationWeight: number): string

Defined in components/componentsUtils.ts:40

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 Array<[string, string]> List of [key, color] couples that associates a hex color to each key.
externalColorsSaturationWeight number

Returns: string


<Abstract> getTextColor

getTextColor(color: any): string

Defined in components/componentsUtils.ts:41

Parameters:

Name Type
color any

Returns: string