By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,345 Members | 1,775 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,345 IT Pros & Developers. It's quick & easy.

color in python programming

P: 9
Hi dears,
Help me write a python program to get all the colors and their nickname.
for example b is used for blue and r is used for red and ...
I need all the colors .
Jan 22 '09 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 2.5K+
P: 2,851
You should show us that you have made an effort to code this for yourself. Your question is very vague. Can you provide some specifics?

Jan 23 '09 #2

P: 9
I dont know the cods of color.
For example, I want to make a plot with a spicial color such as gray or any color else, how can I find their codes?
Jan 23 '09 #3

Expert Mod 2.5K+
P: 2,851
red, green, blue = (x,y,z)
where the range of values for x,y,z is 0-255.

White: (255,255,255)
Medium gray: (100,100,100)
Yellow: (255,255,0)
Magenta: (255,0,255)
Cyan: (0,255,255)

The color would appear to be a yellow of lesser intensity at (200,200,0).

Jan 23 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.