GPLCPT(1)

πŸ“¦ version 1.82, in fedora 43, fedora 44

πŸ’– gplcpt β€” the glow-up your GIMP palettes have been waiting for πŸ’–

okay bestie, so this is gplcpt(1), a user command in the cptutils fam, and it's literally here to convert your GIMP colour palette files into GMT colour palette tables. no cap. 🌈


✨ NAME ✨

gplcpt β€” convert GIMP colour palette (gpl) to GMT colour palette table (cpt).


🌸 SYNOPSIS 🌸

gplcpt [-b rgb] [-f rgb] [-h] [-n rgb] [-o path] [-v] [-V] [-z] [-4]
       [-5] [-6] [path]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the way that gplcpt works is: it takes GIMP colour palette (gpl) files and turns them into the GMT colour palette table (cpt) format. periodt. πŸ’…

the output is a piecewise constant gradient β€” that's the step or discrete kinda situation, not the smooth one. and if you do want the smooth one? no worries, you can run the cptcont(1) program on the output to convert it into a continuous cpt file. iykyk 🫢

and listen β€” the program is super chill about where it gets its input and where it puts its output:

  • no file specified as the final argument? it reads from stdin. easy.
  • no --output option? it writes to stdout. iconic.

πŸ‘‘ OPTIONS πŸ‘‘

quick thing before we dive in, bestie, this applies to all the rgb specs below: they gotta be in the form red/green/blue, where each colour component is an integer in the range 0 to 255. πŸ’–

  • -b, --background rgb β€” sets the background colour of the output. give it an rgb spec and it's handled.
  • --backtrace-file path β€” tells it where to write a formatted backtrace. important detail: the file is only created if there actually is a backtrace, and that typically happens when an error goes down. so no errors, no file. 😌
  • --backtrace-format format β€” picks the format of the backtrace that gets written to the files you named with --backtrace-file. your choices are plain, xml, or json. pick your fighter ✨
  • --comments-generate β€” creates a comment with summary data in the output file. the summary data is: the date of creation, plus the name and version of the cptutils package. cute little receipt for your gradient 🧾
  • --comments-read path β€” reads the comments from the specified path and adds them to the output gradient. the format is literally just a plain text multi-line document with no comment delimiters β€” the program adds those itself, don't worry about it bestie πŸŽ€
  • -f, --foreground rgb β€” sets the foreground colour of the output.
  • -h, --help β€” brief help. a lil snack of info πŸ“
  • -n, --nan rgb β€” sets the NaN (no data) colour of the output.
  • -o, --output path β€” writes the output to path instead of stdout. glow-up to a real file πŸ’…
  • -v, --verbose β€” verbose operation. it will yap (affectionately).
  • -V, --version β€” version information.
  • -z, --z-normalise β€” normalises the z-values in the cpt output into the range 0/1 and adds a RANGE directive. this is the form used in GMT master files, so it's very main character energy.
heads up: this option requires that the output cpt version is at least 5.
  • -4, --gmt4 β€” uses GMT 4 conventions when writing the cpt output: the colour-model code is uppercase, and the colours are separated by spaces. this is incompatible with the -5 and -6 options of course. πŸ’€ right now this option is the default, but that's gonna change at some point β€” so if your use of the output depends on the GMT 4 layout (say, it's consumed by a custom parser), specify this option explicitly.
  • -5, --gmt5 β€” uses GMT 5 conventions when writing the cpt output: the colour-model code is lowercase, and the colours are separated by a solidus for RGB and CMYK, and by a dash for HSV. this is incompatible with the -4 and -6 options of course. πŸ’€
  • -6, --gmt6 β€” same as the -5 option, except it also allows the HARD_HINGE and SOFT_HINGE directives in place of the explicit HINGE = directive. so it's giving -5 but with extra hinge privileges 🌈 this is incompatible with the -4 and -5 options of course. πŸ’€

πŸ’œ AUTHOR πŸ’œ

J.J. Green β€” the legend, the icon, the moment. πŸ‘‘


🌟 SEE ALSO 🌟


and that's the whole thing, bestie!! πŸŽ€ this page came to you from cptutils version 1.82, dated 9 July 2024. go convert some palettes, you absolute icon. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from