#!/usr/bin/env python3
class ColorTypes:
def __init__(self, color, prisec='primary', primaryone='Red', primarytwo='None', secondaryone='None',
secondarytwo='None', complimentary ='None', output='This is a primary color'):
self.color = color
self.prisec = prisec
self.primaryone = primaryone
self.primarytwo = primarytwo
self.secondaryone = secondaryone
self.secondarytwo = secondarytwo
self.complimentary = complimentary
self.output = output
def red(self):
self.color = 'red'
self.prisec = 'primary'
self.primaryone = 'None'
self.primarytwo = 'None'
self.secondaryone = 'None'
self.secondarytwo = 'None'
self.complimentary = 'green'
print('This is the color', self.color)
print(self.color, 'is a', self.prisec, 'color', 'and its complimentary color is', self.complimentary)
if self.prisec == 'primary':
print('Primary colors cannot be mixed from other colors')
if self.prisec == 'secondary':
print(self.primaryone, 'and', self.primarytwo, 'makes', self.color)
if self.prisec == 'Tertiary':
print(self.secondaryone, 'and', self.primaryone, 'makes', self.color)
print('')
def blue(self):
self.color = 'blue'
self.prisec = 'primary'
self.primaryone = 'None'
self.primarytwo = 'None'
self.secondaryone = 'None'
self.secondarytwo = 'None'
self.complimentary = 'orange'
print('This is the color', self.color)
print(self.color, 'is a', self.prisec, 'color', 'and its complimentary color is', self.complimentary)
if self.prisec == 'primary':
print('Primary colors cannot be mixed from other colors')
if self.prisec == 'secondary':
print(self.primaryone, 'and', self.primarytwo, 'makes', self.color)
if self.prisec == 'Tertiary':
print(self.secondaryone, 'and', self.primaryone, 'makes', self.color)
print('')
def yellow(self):
self.color = 'yellow'
self.prisec = 'primary'
self.primaryone = 'None'
self.primarytwo = 'None'
self.secondaryone = 'None'
self.secondarytwo = 'None'
self.complimentary = 'purple'
print('This is the color', self.color)
print(self.color, 'is a', self.prisec, 'color', 'and its complimentary color is', self.complimentary)
if self.prisec == 'primary':
print('Primary colors cannot be mixed from other colors')
if self.prisec == 'secondary':
print(self.primaryone, 'and', self.primarytwo, 'makes', self.color)
if self.prisec == 'Tertiary':
print(self.secondaryone, 'and', self.primaryone, 'makes', self.color)
print('')
def orange(self):
self.color = 'orange'
self.prisec = 'secondary'
self.primaryone = 'red'
self.primarytwo = 'yellow'
self.secondaryone = 'None'
self.secondarytwo = 'None'
self.complimentary = 'blue'
print('This is the color', self.color)
print(self.color, 'is a', self.prisec, 'color', 'and its complimentary color is', self.complimentary)
if self.prisec == 'primary':
print('Primary colors cannot be mixed from other colors')
if self.prisec == 'secondary':
print(self.primaryone, 'and', self.primarytwo, 'makes', self.color)
if self.prisec == 'Tertiary':
print(self.secondaryone, 'and', self.primaryone, 'makes', self.color)
print('')
def green(self):
self.color = 'green'
self.prisec = 'secondary'
self.primaryone = 'blue'
self.primarytwo = 'yellow'
self.secondaryone = 'None'
self.secondarytwo = 'None'
self.complimentary = 'red'
print('This is the color', self.color)
print(self.color, 'is a', self.prisec, 'color', 'and its complimentary color is', self.complimentary)
if self.prisec == 'primary':
print('Primary colors cannot be mixed from other colors')
if self.prisec == 'secondary':
print(self.primaryone, 'and', self.primarytwo, 'makes', self.color)
if self.prisec == 'Tertiary':
print(self.secondaryone, 'and', self.primaryone, 'makes', self.color)
print('')
def purple(self):
self.color = 'purple'
self.prisec = 'secondary'
self.primaryone = 'blue'
self.primarytwo = 'red'
self.secondaryone = 'None'
self.secondarytwo = 'None'
self.complimentary = 'yellow'
print('This is the color', self.color)
print(self.color, 'is a', self.prisec, 'color', 'and its complimentary color is', self.complimentary)
if self.prisec == 'primary':
print('Primary colors cannot be mixed from other colors')
if self.prisec == 'secondary':
print(self.primaryone, 'and', self.primarytwo, 'makes', self.color)
if self.prisec == 'Tertiary':
print(self.secondaryone, 'and', self.primaryone, 'makes', self.color)
print('')
def redpurple(self):
self.color = 'red purple'
self.prisec = 'tertiary'
self.primaryone = 'red'
self.primarytwo = 'None'
self.secondaryone = 'purple'
self.secondarytwo = 'None'
self.complimentary = 'yellow green'
print('This is the color', self.color)
print(self.color, 'is a', self.prisec, 'color', 'and its complimentary color is', self.complimentary)
if self.prisec == 'primary':
print('Primary colors cannot be mixed from other colors')
if self.prisec == 'secondary':
print(self.primaryone, 'and', self.primarytwo, 'makes', self.color)
if self.prisec == 'tertiary':
print(self.secondaryone, 'and', self.primaryone, 'makes', self.color)
print('')
def orangered(self):
self.color = 'orange red'
self.prisec = 'tertiary'
self.primaryone = 'red'
self.primarytwo = 'None'
self.secondaryone = 'orange'
self.secondarytwo = 'None'
self.complimentary = 'blue green'
print('This is the color', self.color)
print(self.color, 'is a', self.prisec, 'color', 'and its complimentary color is', self.complimentary)
if self.prisec == 'primary':
print('Primary colors cannot be mixed from other colors')
if self.prisec == 'secondary':
print(self.primaryone, 'and', self.primarytwo, 'makes', self.color)
if self.prisec == 'tertiary':
print(self.secondaryone, 'and', self.primaryone, 'makes', self.color)
print('')
def orangeyellow(self):
self.color = 'orange yellow'
self.prisec = 'tertiary'
self.primaryone = 'yellow'
self.primarytwo = 'None'
self.secondaryone = 'orange'
self.secondarytwo = 'None'
self.complimentary = 'blue purple'
print('This is the color', self.color)
print(self.color, 'is a', self.prisec, 'color', 'and its complimentary color is', self.complimentary)
if self.prisec == 'primary':
print('Primary colors cannot be mixed from other colors')
if self.prisec == 'secondary':
print(self.primaryone, 'and', self.primarytwo, 'makes', self.color)
if self.prisec == 'tertiary':
print(self.secondaryone, 'and', self.primaryone, 'makes', self.color)
print('')
def yellowgreen(self):
self.color = 'yellow green'
self.prisec = 'tertiary'
self.primaryone = 'yellow'
self.primarytwo = 'None'
self.secondaryone = 'green'
self.secondarytwo = 'None'
self.complimentary = 'red purple'
print('This is the color', self.color)
print(self.color, 'is a', self.prisec, 'color', 'and its complimentary color is', self.complimentary)
if self.prisec == 'primary':
print('Primary colors cannot be mixed from other colors')
if self.prisec == 'secondary':
print(self.primaryone, 'and', self.primarytwo, 'makes', self.color)
if self.prisec == 'tertiary':
print(self.primaryone, 'and', self.secondaryone, 'makes', self.color)
print('')
def bluegreen(self):
self.color = 'blue green'
self.prisec = 'tertiary'
self.primaryone = 'blue'
self.primarytwo = 'None'
self.secondaryone = 'green'
self.secondarytwo = 'None'
self.complimentary = 'orange red'
print('This is the color', self.color)
print(self.color, 'is a', self.prisec, 'color', 'and its complimentary color is', self.complimentary)
if self.prisec == 'primary':
print('Primary colors cannot be mixed from other colors')
if self.prisec == 'secondary':
print(self.primaryone, 'and', self.primarytwo, 'makes', self.color)
if self.prisec == 'tertiary':
print(self.primaryone, 'and', self.secondaryone, 'makes', self.color)
print('')
def bluepurple(self):
self.color = 'blue purple'
self.prisec = 'tertiary'
self.primaryone = 'blue'
self.primarytwo = 'None'
self.secondaryone = 'purple'
self.secondarytwo = 'None'
self.complimentary = 'orange yellow'
print('This is the color', self.color)
print(self.color, 'is a', self.prisec, 'color', 'and its complimentary color is', self.complimentary)
if self.prisec == 'primary':
print('Primary colors cannot be mixed from other colors')
if self.prisec == 'secondary':
print(self.primaryone, 'and', self.primarytwo, 'makes', self.color)
if self.prisec == 'tertiary':
print(self.primaryone, 'and', self.secondaryone, 'makes', self.color)
print('')
class ColorTypesPick(ColorTypes):
pass
def main():
listcolors = ["Red", "Blue", "Yellow", "Orange", "Green", "Purple", "Red-purple", "Orange-red", "Orange-yellow",
"Yellow-green", "Blue-green", "Blue-purple"]
lengthlist = len(listcolors)
count = 0
while count < lengthlist:
x = listcolors[count]
thiscolor = ColorTypesPick(',x,')
if x == 'Red':
thiscolor.red()
count += 1
if x == 'Blue':
thiscolor.blue()
count += 1
if x == 'Yellow':
thiscolor.yellow()
count += 1
if x == 'Orange':
thiscolor.orange()
count += 1
if x == 'Green':
thiscolor.green()
count += 1
if x == 'Purple':
thiscolor.purple()
count += 1
if x == 'Red-purple':
thiscolor.redpurple()
count += 1
if x == 'Orange-red':
thiscolor.orangered()
count += 1
if x == 'Orange-yellow':
thiscolor.orangeyellow()
count += 1
if x == 'Yellow-green':
thiscolor.yellowgreen()
count += 1
if x == 'Blue-green':
thiscolor.bluegreen()
count += 1
if x == 'Blue-purple':
thiscolor.bluepurple()
count += 1
if __name__ == "__main__":
main()