As usual 4#4filename5#5 may be '-' which means that the data follow the command inline and are terminated by a single e on a line of its own.
Use show palette gradient to display the gradient.
Examples:
Read in a palette of RGB triples each in range [0,255]:
set palette file 'some-palette' using ($1/255):($2/255):($3/255)
Equidistant rainbow (blue-green-yellow-red) palette:
set palette model RGB file "-" 0 0 1 0 1 0 1 1 0 1 0 0 e
Binary palette files are supported as well, see binary general (p. ). Example: put 64 triplets of R,G,B doubles into file palette.bin and load it by
set palette file "palette.bin" binary record=64 using 1:2:3