I am trying to create a custom palette of transparent colours with gnuplot
:
a=127
rgb(i,a)=int(255*256**(i%3)+(i/3)*96*256**((i+1)%3)+a*256**3)
then I do obtain the desired colours:
plot x w l lc rgb rgb(0,a) lw 32, x+1 w l lc rgb rgb(1,a) lw 32
Problem, if a
is equal or greater than 128, int
returns a negative number which is then not recognized as a colour. Is there a way to get an unsigned int in gnuplot? Or any other way to get numbers understood as hex beyond #80000000 ?