Python Forum
Need help displaying random color
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help displaying random color
#1
Hello everyone,

I know it may be an easy fix but I'm new to programming and I need some help. I am supposed to create a random color and then display that color(this is only a small part of the assignment). I know it is something simple. I have the random r,g,b values for the color, I just don't know how to display it. I am supposed to make the picture 300w x 200h along with the random color.

from random import *
def main():
showInformation("I will now pop up a randomly colored window")
r = randrange(1,24)
g = randrange(1,200)
b = randrange(30,240)
return makeColor (r,g,b)
makeEmptyPicture(300,200,)
Reply


Messages In This Thread
Need help displaying random color - by Ellicore - Feb-20-2018, 08:39 PM
RE: Need help displaying random color - by Larz60+ - Feb-20-2018, 11:30 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Photo I need help with a circle random color code and error Vxploit 4 3,093 Mar-21-2021, 07:23 PM
Last Post: jefsummers

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020