Random RGB Color Generator

  • Share this:

Code introduction


This function generates a random RGB color value.


Technology Stack : pygame, random

Code Type : Custom function

Code Difficulty : Beginner


                
                    
        def generate_random_color():
            import random
            color = (random.randint(0, 255), random.randint(0, 255), random.randint(0, 255))
            return color
        
                        
              
Tags: