Skip to content

useRandomColor

Generate a random RGBA color string with 50% opacity.

Returns

A random RGBA color string in the format "rgba(r, g, b, 0.5)".

() => string
() => string

Examples

ts
useRandomColor() // rgba(123, 203, 78, 0.5)
useRandomColor() // rgba(123, 203, 78, 0.5)

Released under the GNU GPLv3 License.