GPLCPT(1)
π 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
--outputoption? 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 areplain,xml, orjson. 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 aRANGEdirective. 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-5and-6options 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-4and-6options of course. π-6,--gmt6β same as the-5option, except it also allows theHARD_HINGEandSOFT_HINGEdirectives in place of the explicitHINGE =directive. so it's giving -5 but with extra hinge privileges π this is incompatible with the-4and-5options 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
- fedora 43: cptutils 1.82-4.fc43 Β· GPL-2.0-or-later
- fedora 44: cptutils 1.82-6.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms