slack.validateColorString() function

slack.validateColorString() ensures a string contains a valid hex color code.

Function type signature
(color: string) => string

For more information, see Function type signatures.

Parameters

color

(Required) Hex color code.

Examples

Validate a hex color code string

import "slack"

slack.validateColorString(color: "#fff")

Was this page helpful?

Thank you for your feedback!