You can download this code by clicking the button below.
This code is now available for download.
Create a random color and return it as an RGB tuple.
Technology Stack : pygame, random
Code Type : Function
Code Difficulty : Intermediate
import pygame
import random
def create_random_color():
def random_range():
return random.randint(0, 255)
return (random_range(), random_range(), random_range())