Skip to content

generateUserColor

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/api/src/collaboration/utils/color.ts

Generates a consistent color for a user based on their ID Uses a hash function to ensure the same user always gets the same color

Signature

ts
function generateUserColor(userId: string): string

Parameters

NameType
userIdstring

Returns: string

Was this page helpful?

Download as PDF