1CPTHSV(1) User commands CPTHSV(1)
2
3
4
6 cpthsv - modify hue, saturation and colour value of GMT colour palette
7 tables.
8
10 cpthsv -T transform [-h] [-o file] [-v] [-V] [file]
11
13 The cpthsv utility reads the RGB colour palette in the input, converts
14 its colours to the HSV colour-space, modifies these values in some
15 simple ways, then converts back to RGB colour space and outputs a cpt
16 file. So cpthsv can (de)saturate, brighten, darken or hue-shift.
17
18 The program will read from stdin if a file is not specified as the
19 final argument, and write to stdout if the -o option is not specified.
20
21 The hue value is taken to be between 0 and 360, while the saturation
22 and value components are taken to be between 0 and 1,
23
25 --backtrace-file path
26 Specify a file to which to write a formatted backtrace. The file
27 will only be created if there is a backtrace created, typically
28 when an error occurs.
29
30 --backtrace-format format
31 Specify the format of the backtrace written to the files specified
32 by --backtrace-file, one of plain, xml or json.
33
34 -h, --help
35 Brief help.
36
37 -o, --output file
38 Write the output to file, rather than stdout.
39
40 -T, --transform string
41 Specify a transformation to perform. One of h, s or v followed by a
42 number and optional operation. The effect of the number depends on
43 the operation: one of x (multiply by number), % (scale by
44 percentage) or +/- (add or subtract value). An RGB colour with
45 saturation 0.5 would be transformed to one with saturation 0.55 by
46 applying s1.1x or s110% or s0.05+. If the operator is not given
47 then % is assumed.
48
49 Transforms which take colours outside the HSV colour-space are
50 permitted, the result is truncation (eg, increasing a saturation of
51 0.8 with s0.3+ results in a saturation of 1.0). The exception is
52 hue, which is taken modulo 360.
53
54 Multiple transforms can be applied by separating transforms with
55 commas. This is to be preferred over multiple calls to the program
56 since the conversion between colour-spaces is necessarily lossy.
57 Multiple transformations are applied in the order given in the
58 argument.
59
60 -v, --verbose
61 Verbose operation.
62
63 -V, --version
64 Version information.
65
67 Lighten by 10% and desaturate by 20%:
68
69 cpthsv -v -T s80,v110 -o new.cpt old.cpt
70
72 J. J. Green
73
75 GMT(1).
76
77
78
79CPTUTILS 9 September 2020 CPTHSV(1)