String to color react

Generates a hexadecimal color depending on the input string
also allows passing default colors/schema

Use cases

Avatar name

#D2409D

Avatars

can be used as background color of an avatar according to the input.

Editable Preview

generateColorFromString('

Avatar name

')

['teal',  'red',  'green',  'blue',  'pink',  'yellow'])

Random Text

#6AEE30

Highlight background

can be used as background color of a text according to the input.

Editable Preview

generateColorFromString('

Random Text

')

['teal',  'red',  'green',  'blue',  'pink',  'yellow'])

Schema Options

Blue

Scheme colors

can be used as schema colors of elements according to the input like buttons, icons, etc.

Editable Preview

generateColorFromString('

Schema Options

',

['teal',  'red',  'green',  'blue',  'pink',  'yellow'])