Making up New Color s
Maple recognizes the following list of colors:
[aquamarine, black, blue, navy,coral, cyan, brown , gold, green, gray, grey, khaki, magenta, maroon, orange, pink, plum, red sienna, tan, turquoise, violet, wheat, white, yellow]
> CLRS:=[aquamarine, black, blue, navy,coral, cyan, brown , gold, green, gray, grey, khaki, magenta, maroon, orange, pink, plum, red, sienna, tan, turquoise, violet, wheat, white, yellow]:
How many are there?
> nops(CLRS);
What do they look like?
> maplecolordisks:=seq(plottools[disk]([0,0],1,color=z),z=CLRS):
>
> plots[display]([maplecolordisks],insequence=true,scaling=constrained);
> colormatrix:=matrix(5,5,[maplecolordisks]):
> plots[display](colormatrix,scaling=constrained,axes=none);
> maplecolortext:=seq(plots[textplot]([0,0,`z`], color=z,font=[TIMES,BOLD,80]),z=CLRS):
> plots[display]([maplecolortext],insequence=true,axes=none);
Make a function to make new colors and display text in that color
>
>
look:=proc(RED,GREEN,BLUE,TEXT)
plots[textplot]([0,0,TEXT],color=COLOR(RGB,RED,GREEN,BLUE),font=[TIMES,BOLD,80],axes=none): end;
> look(.4,.2,.7,`Hi Mom`);
Make a table of disks with the Maple color names
>
>
CL:=NULL:
for z in CLRS do
TMP1:=plottools[disk]([0,0],1,color=z):
TMP2:=plots[textplot]([0,-1.1,"z"],font=[TIMES,BOLD,8]):
frame:=plots[display]([TMP2,TMP1]):
CL:=CL,frame:
od:
> plots[display]([CL],insequence=true,scaling=constrained,axes=none);
Note the tiny text - thats because when Maple scales pictures it doesn't sacle the text. So when we put them all in a matrix:
> colormatrix:=matrix(5,5,[CL]):
> plots[display](colormatrix,scaling=constrained,axes=none);
>
>