Question: recolor from Hex

I would like to recolor a list of plots using Maple default values. I have produced a list of colors with the plots:-setcolors(default) command. However, the colors are returned as a list of Hex values.  I first converted the Hex values to RGB values and then attempted to adapt a procedure written by Joe Riel, named -recolor- (refer to Joe's answer from which this question is branched).

But I must have done something wrong.

The conversion from Hex to RGB seems to work fine, but the plot does not return the expected colors.


restart;
# procedure to recolor each plot, adapted (incorrectly?) from Joe Riel's procedure
recolor := proc(p, color) # takes Hex values as input
subsindets(p
, 'specfunc(anything, {COLOR, COLOUR})'
, clr -> COLOUR(RGB,op(ColorTools:-HexToRGB24(color))) # convert Hex values to RGB values
)
end proc:

# obtain the default list of colors
colorlist := plots:-setcolors(default);
["#78000E", "#000E78", "#4A7800", "#3E578A", "#780072", 

"#00786A", "#604191", "#004A78", "#784C00", "#91414A",

"#3E738A", "#78003B", "#00783F", "#914186", "#510078", "#777800"

]

map(x->ColorTools:-HexToRGB24(x),colorlist);

[[120, 0, 14], [0, 14, 120], [74, 120, 0], [62, 87, 138],

[120, 0, 114], [0, 120, 106], [96, 65, 145], [0, 74, 120],

[120, 76, 0], [145, 65, 74], [62, 115, 138], [120, 0, 59],

[0, 120, 63], [145, 65, 134], [81, 0, 120], [119, 120, 0]]
The mapping from Hex to RGB seems to work properly. However, the plots produced do not display the correct colors.

N := 10: # number of plots to draw

# Attempt at Recoloring:
p := [ seq( plot(x^i, x=0..1), i = 1..N ) ] :
plots:-display(p) ;

plots:-display( recolor~( p, colorlist[1..N]) ) ;
 
# Expected Output

p := [ seq( plot(x^i, x=0..1, 'color' = colorlist[i]), i = 1..N ) ] :
plots:-display(p) ;
Please Wait...