Modifying an existing extension - Darker extended
This recipe will use an existing extension to introduce us into the field of expanding Inkscape functionality with your own code. The extension we will modify is Darker found under Extensions | Color by adding the interface to input the percentage of darkening we want to apply to selected object colors.
Inkscape extensions are generally written in Python, a free and open source scripting language which is flexible, elegant, and powerful.
Getting ready
Since the logic of the extension is written in Python, we need to have it installed on our machine. Mac OS X and Linux distributions generally include it in the base installation of the operating system. Windows users can download and install it from the official website: http://www.python.org.
To test it, open your favourite terminal application and write the following:
$ python -V Python 2.6.6
This means that the 2.6.6 version of the language is installed.
We also need the lxml
module for our...