Function createRandomColor

  • Generates a random hexadecimal color string with a specified minimum brightness.

    Returns

    A random color string in #RRGGBB format.

    Example

    createRandomColor(100); // → '#c48f7a' (example output)
    createRandomColor(200); // → '#e5f0ff' (example output)

    Remarks

    • Each color channel (red, green, blue) is independently randomized between brightness and 255.
    • Ensures that no channel is darker than the specified brightness.
    • Useful for generating visually distinct colors while avoiding very dark shades.

    Parameters

    • brightness: number

      Minimum value for each RGB channel (0–255). Higher values produce lighter colors.

    Returns string

Generated using TypeDoc