Colours are the deeds of light; its deeds and sufferings: thus considered we may expect from them some explanation respecting light itself.
svgx [-a ] [-b
geometry] [-h ] [-l ] [-n
] [-V ]
The svgx program extracts and converts gradients in an SVG file. Unlike most of the other file formats handled by the cptutils package, SVG files may contain multiple gradients, so this program operates a little differently to the other programs in the package.
There are 4 modes of operation: The default is to extract the first gradient found in the
file, or one can specify
-l to list the names of all gradients in
-s to extract the gradient with the specified name or
-a to extract all of the gradients.
The output format is specified by the
-t option as listed below
(in fact there are several aliases for each format:
gimp, and so on). The svgcpt,
svggimp, svggpt, svgcss3, svgpsp, svgpov,
svgpng, svgqgs, svgsao,
svgmap and svgsvg programs are wrappers around svgx which use the
-t switch to
specify output type.
Atypically, the input SVG file is a mandatory argument. The program will write to
stdout if the
-o option is not
specified except when
-a has been specified: then files will be
produced (with names taken from those of the gradients).
Note that some of the SVG conversions require that the
en_US.utf8 locale be enabled. How this is done will depend on your operating
system. One would run
apt-get install locales dpkg-reconfigure locales
on Debian-based systems, for example.
In the following, all
rgb specifications should be
of the form
blue where the
colour components are integers in the range 0 to 255.
Extract all gradients, which will have filenames derived from the gradient names. If this option is used then the argument of the
-ooption will be interpreted as the output directory.
Set the background colour of cpt output.
Note that this only modifies the "background" field in the output cpt file, it does not affect the transparency (see the
-Toption in that regard).
Specify a file to which to write a formatted backtrace. The file will only be created if there is a backtrace created, typically when an error occurs.
formatof the backtrace written to the files specified by
--backtrace-file, one of
Set the foreground colour of cpt output.
Specify the size of the PNG image or SVG preview in pixels.
List the names of all gradients in the file.
Set the NaN (no data) colour of cpt output.
Write the output to
path, rather than
-aoption is specified then the
pathargument must be a directory (which exists) and the output files will be written into this directory.
Include a preview in the SVG output. See also the
Do not create files which break limits of the format specification. In particular, do not create POV-Ray headers with more than 255 stops, do not create Tecplot maps with more than 50 points.
Extract the gradient with the specified
name, see the
-loutput for a list of possible values.
Set the output
format, which should be one of
When converting to a format which does not support transparency, replace the transparency with the specified
Inspect an SVG file for gradients:
svgx -v -l old.svg
Extract the gradient "Sunny Road" from the same SVG file, converting the result to cpt: (note that the gradient name needs to be quoted)
svgx -v -t cpt -s "Sunny Road" -o sunny_road.cpt old.svg
Extract all of the svg gradients from the file
give each of them a preview:
svgx -v -t svg -a -p kittens.svg