Author Topic: order of swatches in palette  (Read 16248 times)

April 18, 2014, 05:43:08 AM
Read 16248 times

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Hi Friends,
I'm working with Swatches for the first time (well the 1st time in a serious way), and I've made a little custom palette for a document template.  But I can't figure out how to control the order of the swatches' display in the palette.  Each time I save a new color as a Swatch, it gets added to the right end of the palette.

Does anyone know how to put those in any certain order?

For example, I have a bunch of pairs of colors.  Basically they are the color with ff for alpha, and the same color with 7d for the alpha part (which is roughly 50% opacity).  But I didn't add them one after the other.  Some were added 3 or 4 spaces away from its companion.  So it would just make it more convenient for me, if they were side by side.   But it looks like I'm somehow going to have to make a list of all the colors, then create a new palette with them in the right order.  However, that doesn't help for any new colors I might be adding later.

I see that Swatches are id'd as linear gradients, for some reason.  I looked around in the XML Editor, and I really don't see any difference between the def for a swatch-linear gradient and a regular linear gradient.  So that's curious....but it didn't lead me to a solution.

I know if I was using a regular palette....well, if it were a palette made in GIMP, I could probably edit the GPL file.  But I don't know if a Swatches palette has any text file?

Is there any way to put the swatches in order?
Thanks for any comments  :D
« Last Edit: May 10, 2014, 03:37:24 AM by brynn, Reason: solved »
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

April 19, 2014, 05:03:30 PM
Reply #1

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
How strange!  It seems the last few colors I assigned as a swatch for my palette were added to the left end.  Initially they seemed to be added to the right end.  Not sure what to make of it.  Maybe I'll search around in the bug tracker.....
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

May 10, 2014, 03:36:44 AM
Reply #2

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Well, I ended up posting in Launchpad Answers.  After 10 days with no answer, I concluded it couldn't be done, so I posted a feature request.  Then someone answered my Answers posting.

The swatches are found in the defs section of the XML Editor.  You just need to select each one, and move it up or down in the list.

Problem solved  :D
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

January 26, 2015, 01:25:35 PM
Reply #3

ragstian

  • IC Mentor

  • Offline
  • ******

  • 25
  • Gender
    Male

    Male
  • Personal Text
    Forum Newbie
Hi.

Another "newbie" question from me.

Brynn - I have created a few Inkscape palettes but was intrigued by this thread.
What is the difference between a Palette and a Swatch?
When would you use one over the other?
To me the palette and the swatch looks the same!

Any Palette Sections on the board? (To upload some of mine.)

To "sort" a palette there are different methods depending on what you want,
some sort by color, some by hue, some by saturation or a combination of these.
Palette "sorting" is easy in python.

RGDS
Ragnar
Good Luck!
RGDS
Ragnar

January 26, 2015, 02:49:53 PM
Reply #4

Janne

  • IC Mentor

  • Offline
  • ******

  • 60
  • Gender
    Female

    Female
Following this with interest!
Normally I find a palette ( f.i. retro ) and save it as an image I can pick colors from.
A palette is a number of colors that 'fit' together in a theme.
A swatch is a single color f.i. from that palette :)

January 26, 2015, 05:17:55 PM
Reply #5

ragstian

  • IC Mentor

  • Offline
  • ******

  • 25
  • Gender
    Male

    Male
  • Personal Text
    Forum Newbie
Hi.

Thanks Janne, so the you can take one color from the palette and "move" to the swatches?
But what's the point? Why not use the full palette instead of a subset as the swatches seems to be?
RGDS
Ragnar
Good Luck!
RGDS
Ragnar

January 27, 2015, 06:42:15 AM
Reply #6

Janne

  • IC Mentor

  • Offline
  • ******

  • 60
  • Gender
    Female

    Female
Hi, Ragnar
I really don't know - I didn't even know that it would be a possibility to customize the colors. I know it's possible in Illustrator but I stick to Inkscape ( at first it was for economical reasons but now I am so very pleased with that program and economy is still an issue ) :)

January 27, 2015, 07:17:56 AM
Reply #7

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
I'm not sure if this is correct.  But I think of a swatch as one single color.  And the palette is all the swatches combined. 

One reason I think that, is because people who sew their own clothes, and I think interior decorators also use "swatch" to mean one piece which shows the color or pattern of the fabric.  In those cases it's actually a piece of the fabric that's called a swatch.  And it's usually something like a 3 inch square.

Ragnar, what file format are your palettes?  Maybe I can make an album in the gallery, only for palettes.

I know I also have a link to your tutorial on creating palettes, using GIMP (Inkscape Tutorials page) (Home tab).
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

January 27, 2015, 07:39:02 AM
Reply #8

Janne

  • IC Mentor

  • Offline
  • ******

  • 60
  • Gender
    Female

    Female

January 27, 2015, 07:50:52 AM
Reply #9

ragstian

  • IC Mentor

  • Offline
  • ******

  • 25
  • Gender
    Male

    Male
  • Personal Text
    Forum Newbie
Hi

brynn, my palette files are in the GIMP/Inkscape gpl format, in other words they are regular text files with a "gpl" instead of "txt" extension.
I will have to search through some of my old disks for the files, my previous PC did "drown" when we had a "flood" in the house.
I am now using a laptop exclusively.

RGDS
Ragnar
Good Luck!
RGDS
Ragnar

January 27, 2015, 08:36:29 AM
Reply #10

Janne

  • IC Mentor

  • Offline
  • ******

  • 60
  • Gender
    Female

    Female

January 27, 2015, 09:07:09 AM
Reply #11

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Ragnar, I might be able to add GPL as an accepted format.  But the really slick way to do it, would be to have a zip file which contains the GPL file, and then some kind of image, that displays the swatches.

See the attached file.  I saved that from an old IF topic.  I't a zip file with GPL, PDF and PNG files.  I don't think we necessarily need PDF.  I think the author included it because it's more "universal" than SVG.  I think PNG should be sufficient for us though....  I can't think of any reason why a vector file would be needed, except just for completeness.

I'm working on the gallery, at the moment, trying to get the user galleries to have a thumbnail on the front page, like all the other categories.  But after I finish with that, I'll test uploading a zip file.  It is an accepted format, and should work, it's just that I've never tried it. 

Probably will need to use the image (PNG) for the thumbnail.  But if you're willing to go that far (making a zip file for palettes) a Palettes album would be an awesome addition to the gallery, and entirely do-able!  Might even inspire others to make some  :D

I might actually have some of your palette files.  I'll have a look, later today.

Janne, yep, that's the manual's info.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 01, 2015, 04:23:53 PM
Reply #12

Janne

  • IC Mentor

  • Offline
  • ******

  • 60
  • Gender
    Female

    Female
Hi Brynn - I downloaded your palette and wanted to add the gpl content to the inkscape.gpl.
I used Notepad but when I wanted to save I was not allowed to.
I then opened Notepad as administrator - found the inkscape.gpl but it turned up without content.

How do you add colors to the inkscape.gpl? The original is intact since I couldn't save or overwrite :)

Edit: I had to save with the file extension .gpl and choose "all files" - all went smooth :) Thank you for the beautiful colors :)

February 01, 2015, 05:49:26 PM
Reply #13

Janne

  • IC Mentor

  • Offline
  • ******

  • 60
  • Gender
    Female

    Female
Messed it up and now I have no palette at all...

February 02, 2015, 12:51:32 AM
Reply #14

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Oh, well I didn't actually make that palette.  Someone else from IF made it, and shared it, so that's where I got it.

This topic was about rearranging the swatches in a palette made with Inkscape.  This one was made with....probably GIMP, although I don't really know.

So let me get clear about what happened.  Did you at one time, have that palette installed, and it appeared in the proper place in the Inkscape window?  Then you tried to edit the GPL file, to rearrange the colors?

  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 02, 2015, 08:49:19 AM
Reply #15

Janne

  • IC Mentor

  • Offline
  • ******

  • 60
  • Gender
    Female

    Female
Hi, Brynn - no, the new palette which I thought would be added to the existing one never showed up. I tried to remove 'your' palette again but everything was still messed up so I uninstalled 0.91 and I'm unsure whether to install the 0.48 again as it seems as if 0.91 is full of bugs.

I apologize for being off topic here in this thread!

February 02, 2015, 11:00:17 AM
Reply #16

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Oh, no worries -- the topic is close enough.  I just wanted you to realize there is a difference, in case there was any confusion (and for anyone else reading this some day.)

I think you will be fine with 0.91.  It has much fewer bugs than 0.48.5!  And 0.91 is now the current stable version.

I'm still not entirely clear where you went wrong.  There should be no need to actually open a GPL file, to install a new palette in Inkscape.  Typically, what you would do, is take the GPL file (cut from where it is, or copy it) and paste it into username/AppData/Roaming/inkscape/palettes.  Then you have to close all Inkscape windows, then reopen.  After that, when you click that impossibly tiny arrow on the far right end of the palette, you'll see the new palette displayed with all the others.  (This one's called Crayola 01, I think.)  Then to switch over to using that palette, just click on it.

I suppose, if you want to rearrange the swatches in a non-Inkscape palette, you would have to open the GPL file.  Then just cut/paste the entire line, which represents each color.  But I've never actually tried it.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 02, 2015, 04:02:01 PM
Reply #17

Janne

  • IC Mentor

  • Offline
  • ******

  • 60
  • Gender
    Female

    Female
Thank you for your explanation, Brynn - I'll try to add it to the palette folder :)

Edit: it worked - but gosh they are messed up - nuances not fitting to each other! Completely random colors among each other.
« Last Edit: February 02, 2015, 05:19:10 PM by Janne »

February 02, 2015, 07:46:45 PM
Reply #18

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
I noticed that too.  I have no idea why he did it that way.  If any palette were a candidate for re-ordering of swatches, that would be it  :!:
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 03, 2015, 09:52:02 AM
Reply #19

Janne

  • IC Mentor

  • Offline
  • ******

  • 60
  • Gender
    Female

    Female
I think it might be possible to open Notepad as an administrator - open the .gpl file and change the order of the colors using the color chart with the color codes as a reference. Save using the .gpl extension making sure that "All files" is checked. But I haven't tried it yet.


February 03, 2015, 10:15:13 AM
Reply #20

Janne

  • IC Mentor

  • Offline
  • ******

  • 60
  • Gender
    Female

    Female
I didn't replace all of them but it seems as if that is the way to do it - reorder the colors in the .gpl file.

February 03, 2015, 10:34:04 AM
Reply #21

Janne

  • IC Mentor

  • Offline
  • ******

  • 60
  • Gender
    Female

    Female
Yes, that's the way to do it - create your own .gpl file using an existing one as a template but use a color chart as a reference because the names themselves are not accurate.
I made a little file myself and named it Janne 0.1 :D And Oooops...there was a green among them and they are not in the desired order :)

February 03, 2015, 05:17:16 PM
Reply #22

Janne

  • IC Mentor

  • Offline
  • ******

  • 60
  • Gender
    Female

    Female
Created "Retro colors" and they line up in the order I wanted - first row from left to right, second row from left to right and third row from left to right.

Attaching .gpl and .svg files :)

February 04, 2015, 10:44:42 AM
Reply #23

Janne

  • IC Mentor

  • Offline
  • ******

  • 60
  • Gender
    Female

    Female
This was not what you were looking for, I believe. I'm sorry if I misunderstood the whole topic.

February 04, 2015, 02:23:15 PM
Reply #24

Janne

  • IC Mentor

  • Offline
  • ******

  • 60
  • Gender
    Female

    Female

Problem solved  :D
Oooops - didn't see this one - I apologize. Well, at least I made some comments!  :b1: