Better palette for inkscape

Other sites and resources for Inkscape users.
TyrianFin
Posts: 2
Joined: Mon Jul 13, 2015 4:10 am

Better palette for inkscape

Postby TyrianFin » Mon Jul 13, 2015 4:31 am

Inkscape comes with horrible default palettes, witch will be used by most of new / old users.

Here is a little code that will generate new palette for inkscape. (palette has sRGB color correction applied).

gamma_palette.svg
image of the palette
(62.84 KiB) Downloaded 355 times


Edit: .zip added, witch contains the palette file and .py fiele for generating it.
Edit: there was error in palette (hues where a bit off) fixed. (files updated)

Aki R.
Attachments
gamma_palette_v2.zip
contains:
gamma_palette.gpl (palette ready for use)
gamma_palette.py (palette generator)
gamma_palette.svg (image of palette)
palette_to_svg.py (makes .svg images of given palettes)
(11.64 KiB) Downloaded 318 times
Last edited by TyrianFin on Mon Jul 13, 2015 9:26 pm, edited 2 times in total.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Better palette for inkscape

Postby brynn » Mon Jul 13, 2015 6:11 am

Well if you don't have time to answer, maybe someone else can explain.

1 -- What makes Inkscape's palettes "sucking"?
2 -- What is sRGB color correction?

I'm not sure, but I have the impression that the user has to be using some kind of special color profile, or calibration on their monitor for sRGB (whatever that is). So won't this palette only work when someone is using that?

TyrianFin
Posts: 2
Joined: Mon Jul 13, 2015 4:10 am

Re: Better palette for inkscape

Postby TyrianFin » Mon Jul 13, 2015 7:28 pm

1 -- palette colors are in linear colorspace, but still shown without conversion in sRGB colorspace.
2 -- sRGB color correction is needed for converting images from linear colorspace to sRGB colorspace.

sRGB is THE standard colorspace used in computer monitors, so you can`t stop using it, because it is build in to your monitor.
So this palette will work ok in inkscape for users that don`t use special color profiles. (sRGB is NOT special, it is the standard.)

There are lot of info in web about sRGB if you wish to know more.

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Better palette for inkscape

Postby ragstian » Tue Jul 14, 2015 4:54 am

Hi.

Nice! Version 2 of the palette file works on my win system, version 1 did not.

Small error in the code?
According to the sRGB spec the RGB values should be rounded to the nearest integer, not the nearest lower integer.

Code: Select all

rgb = [int(math.floor(255.0 * v)) for v in rgb]

to be replaced by;

Code: Select all

rgb = [int(math.round(255.0 * v)) for v in rgb]


The code to generate the svg file from the palette is nice as well, might be even better with some more comments :)
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

User avatar
Espermaschine
Posts: 892
Joined: Thu Jun 05, 2014 9:10 pm

Re: Better palette for inkscape

Postby Espermaschine » Tue Jul 14, 2015 5:25 pm

where does one put the content of the zip-file ?


User avatar
Espermaschine
Posts: 892
Joined: Thu Jun 05, 2014 9:10 pm

Re: Better palette for inkscape

Postby Espermaschine » Tue Jul 14, 2015 5:45 pm

Got it. Thanks brynn !

New palette is showing. I feel like a better man now.

Thanks TyrianFin ! <3



EDIT: i have one tiny complaint. Original palette said 50% grey (etc)...
This palette has the code as a pop up.

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Better palette for inkscape

Postby ragstian » Wed Jul 15, 2015 5:35 am

Hi.

Espermaschine wrote:EDIT: i have one tiny complaint. Original palette said 50% grey (etc)...
This palette has the code as a pop up.


As the GPL file is a "normal" text file you can replace the hex code for the RBG values using your favorite text editor.
The hex values for the "middle grey" (in this palette) is "B4B4B4".
By the way, I prefer the values to show as decimal values in the range 0 to 255 as they do in the Fill and Stroke dialog.

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar


Return to “Inkscape Resources”

Who is online

Users browsing this forum: No registered users and 4 guests