@Color()

New in 2.0

Generate web color values

WebSince 2.0.0

Parameters

NameTypeRequiredDefaultDescription
formatStringrgbColor format (rgb, hsl, hwb, lch, cmyk), default rgb

Usage

@Color()

Generate random color (default rgb format)

Example:
@Color()
Output:
rgb(88, 245, 14)rgb(97, 69, 216)
@Color(format)

Generate color in specified format

Example:
@Color(hwb)
Output:
hwb(108, 67%, 45%)hwb(133, 2%, 93%)
← Back to Function Reference