@Composable @ReadOnlyComposable internal fun initialsGradient(initials: String): Brush {val gradientBaseColors = LocalContext.current.resources.getIntArray(R.array.stream_compose_avatar_gradient_colors)val baseColorIndex = abs(initials.hashCode()) % gradientBaseColors.sizeval baseColor = gradientBaseColors[baseColorIndex]return Brush.linearGradient(listOf(Color(adjustColorBrightness(baseColor, GradientDarkerColorFactor)),Color(adjustColorBrightness(baseColor, GradientLighterColorFactor)),))}
Generates a gradient for an initials avatar based on the user initials.