Inkscape.org
Beginners' Questions Creating GPL file
  1. #1
    Railways Railways @Railways

    I have prepared a simple 9-colour palette in inkscape but trying to export it as a .gpl I get the error message below and the created file is largely empty. Any help appreciated!

  2. #2
    David248 David248 @David248
    *

    Not in front of my pc, so there might be errors but, as far as I remember :

    Use document ressources panel (you can open it from the tiny triangular icon right to the different tabs of side panel).

    Choose colors tab, there is an export button with a not-obvious icon that allows you to export a .gpl.

  3. #3
    Railways Railways @Railways

    Document resources/colours only shows two colours, black and red, out of the swatch of nine I created in inkscape.  The export button brings up a list of destinations but there is no apparent button to activate a choice.

    If I click on swatches it shows all nine, but there is no export tab from there.

    Going back to basics, all I am trying to do is create a custom palette, for which there is an abundance of instructions on the net.  Curiously, if I open the palette sidebar the top button is marked 'Document Swatches' and brings up the correct swatch of colours along the bottom of the screen - but I assume this is only for the current document, and I want it permanently available whenever I use Inkscape.

    Thanks for your help - hope this makes sense!

  4. #4
    David248 David248 @David248

    Hello Railways, I wasn't in front of my PC theses last days and could'nt make trials.

    As you did see, swatches are not considered as colors by Documents resources. That's why they are not exported in a gpl palette by Document resources panel or the extension.

    So I wouldn't use swatches to create a custom palette.

    From you file with swatches, you can draw 2 x 9 = 18 squares, fill nine with swatches and use dropper tool (shortcut : d) alternatively with selector tool (shortcut s) to fill the nine other squares.

    Select all and remove any stroke color. Then you can use either extension or Document Resources panel to generate a .gpl.

    That said, a .gpl file can be created very quickly with any text editor. Basically you have to enter the RGB values of the choosen colors and optionnally give it an name. Each value has to be separated by an empty space.

     

     

     

  5. #5
    David248 David248 @David248
    Railways

    Going back to basics, all I am trying to do is create a custom palette, for which there is an abundance of instructions on the net.  Curiously, if I open the palette sidebar the top button is marked 'Document Swatches' and brings up the correct swatch of colours along the bottom of the screen - but I assume this is only for the current document, and I want it permanently available whenever I use Inkscape.

    So the process is simple :

    1. Make n objects (rectangles for example) with no stroke and a fill with one of the n colors you want to save as a palette.
    2. Open Document Resources panel (File > Document Resources or triangle icon on side panel). Open Colors Tab. There you should find the n colors used.
    3. Click on export Icon and choose let's say the desktop as folder for the export. Open your file explorer and copy the .gpl file
    4. Open Inkscape Preferences (Edit > Preferences), browse to System. Click Open icon right to User Palettes. This opens in your file explorer the folder where Inkscape saves the custom palettes. Paste your file there.
    5. You can edit the .gpl file with a text editor to give your palette a name or your colors a name.
    6. Restart inkscape.

     

  6. #6
    Kaylee Johnson Kaylee Johnson @kayleejjohnson

    What are the best extensions to use?

  7. #7
    Railways Railways @Railways

    Many thanks David248 - I think the svg file I was using was faulty, and when creating a totally new one all worked perfectly.

  8. #8
    David248 David248 @David248

    Hello Railways, I found (in a video from the interesting YT channel Inkscape Art With Tom) a way to save palettes from swatches : simply  File > Save As (Shift + Ctrl + S) then choose Gimp palette (.gpl) as Type in the dropdown menu.

    This will save you swatches along with the other colors used in the document.