Random RGB Color Generator

  • Share this:

Code introduction


This function generates a random RGB color.


Technology Stack : Python language, random library

Code Type : Function

Code Difficulty : Intermediate


                
                    
        def random_color():
            import random
            return (random.randint(0, 255), random.randint(0, 255), random.randint(0, 255))