# HTML hex colour values

**URL:** <https://forums.synfig.org/t/html-hex-colour-values/1476>\
**Category:** Drawing related help\
**Created:** [July 2, 2011, 8:08am UTC](https://forums.synfig.org/t/html-hex-colour-values/1476 "2011-07-02T08:08:20Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaveJ](https://forums.synfig.org/user_avatar/forums.synfig.org/davej/32/93_2.png) [@DaveJ](https://forums.synfig.org/u/DaveJ)\
**Post date:** [July 2, 2011, 8:08am UTC](https://forums.synfig.org/t/html-hex-colour-values/1476/1 "2011-07-02T08:08:20Z")

</div>

I’ve got a question about colour in Synfig: Is the HTML code input box on the Synfig Colours dialog broken, or am I misunderstanding something?

Example:

I wanted to change the colour of a rectangle to the Hex RGB value 171a17 (RGB 9% 10% 9%).

If I enter the values 9%, 10%, 9% into the Red, Green and Blue spinboxes on the Synfig Colours dialog box, I get the colour I expect. However, I also see that the HTML code displayed on the Colours dialog becomes 010101 - not what I expect.

However, if I enter 171a17 into the Hex RGB value box, then I get a light grey rectangle - something I didn’t expect. And the values 33.5 34.5 33.5 appear in the Red, Green, Blue spin boxes.

Version: Synfig 0.63, Fedora 15.

---

<div class="post-metadata">

**Author:** ![Genete](https://forums.synfig.org/user_avatar/forums.synfig.org/genete/32/8_2.png) [@Genete](https://forums.synfig.org/u/Genete)\
**Post date:** [July 2, 2011, 3:35pm UTC](https://forums.synfig.org/t/html-hex-colour-values/1476/2 "2011-07-02T15:35:40Z")

</div>

Synfig uses by default a non linear color selection where the map from 0,0,0 to 1,1,1 is not linear. To get back a visually linear color selection please change it in the Setup Dialog. ToolBox-\>File-\>Setup…  
-G

---

<div class="post-metadata">

**Author:** ![DaveJ](https://forums.synfig.org/user_avatar/forums.synfig.org/davej/32/93_2.png) [@DaveJ](https://forums.synfig.org/u/DaveJ)\
**Post date:** [July 2, 2011, 5:04pm UTC](https://forums.synfig.org/t/html-hex-colour-values/1476/3 "2011-07-02T17:04:25Z")

</div>

Many thanks for your help - this is really interesting and very helpful. I notice a load of features that I’ll have to get into later in Synfig Studio, including non-square pixels which are really useful for television work.

---

<div class="post-metadata">

**Author:** ![jcome](https://forums.synfig.org/user_avatar/forums.synfig.org/jcome/32/3512_2.png) [@jcome](https://forums.synfig.org/u/jcome)\
**Post date:** [July 18, 2011, 3:48pm UTC](https://forums.synfig.org/t/html-hex-colour-values/1476/4 "2011-07-18T15:48:13Z")

</div>

> [@DaveJ](#):
>
> I’ve got a question about colour in Synfig: Is the HTML code input box on the Synfig Colours dialog broken, or am I misunderstanding something?

Hi, I just converted tango color palette into .spal using HTML codes. What I have to do is just copy the html code and past into synfig color dialog html code field.

![synfig-colorpalette-editor-Screenshot-1.png](https://forums.synfig.org/uploads/default/original/2X/a/a0a102ae57b0376713f5ee284c76a0664f1c7942.png)

It seems color in Synfig Studio is much lighter than in Inkscape or [in HTML pages](http://emilis.info/other/extended_tango/), I guess it is because Synfig Studio lacks CMS. 😊 You can compare the bellow color in 2e3436 to[this one](http://emilis.info/other/extended_tango)

.spal file (Synfig Studio Color Palette)  
[github.com/jcome/synfig\_ui/blob … lette.spal](https://github.com/jcome/synfig_ui/blob/master/icons/Tango-Palette.spal)

and HTML Code  
[github.com/jcome/synfig\_ui/blob … MLCode.txt](https://github.com/jcome/synfig_ui/blob/master/icons/Tango-Palette-HTMLCode.txt)

---

<div class="post-metadata">

**Author:** ![Genete](https://forums.synfig.org/user_avatar/forums.synfig.org/genete/32/8_2.png) [@Genete](https://forums.synfig.org/u/Genete)\
**Post date:** [July 18, 2011, 3:53pm UTC](https://forums.synfig.org/t/html-hex-colour-values/1476/5 "2011-07-18T15:53:36Z")

</div>

Jcome,  
Thanks for share. Please keep in mind to contribute with the palettes once we can launch the repository system.  
-G

---

<div class="post-metadata">

**Author:** ![jcome](https://forums.synfig.org/user_avatar/forums.synfig.org/jcome/32/3512_2.png) [@jcome](https://forums.synfig.org/u/jcome)\
**Post date:** [July 18, 2011, 3:57pm UTC](https://forums.synfig.org/t/html-hex-colour-values/1476/6 "2011-07-18T15:57:57Z")

</div>

Hi Genete, Can we include the tango color palette into our source? And maybe we can collect some traditional cartoon colors as our color palettes 🙂

---

<div class="post-metadata">

**Author:** ![DaveJ](https://forums.synfig.org/user_avatar/forums.synfig.org/davej/32/93_2.png) [@DaveJ](https://forums.synfig.org/u/DaveJ)\
**Post date:** [July 18, 2011, 4:03pm UTC](https://forums.synfig.org/t/html-hex-colour-values/1476/7 "2011-07-18T16:03:51Z")

</div>

If you enter the colour values of the Tango palette as RGB percentages rather than using the HTML codes then the colours will be identical to Inkscape.

---

<div class="post-metadata">

**Author:** ![Genete](https://forums.synfig.org/user_avatar/forums.synfig.org/genete/32/8_2.png) [@Genete](https://forums.synfig.org/u/Genete)\
**Post date:** [July 18, 2011, 6:23pm UTC](https://forums.synfig.org/t/html-hex-colour-values/1476/8 "2011-07-18T18:23:41Z")

</div>

> [@jcome](#):
>
> Hi Genete, Can we include the tango color palette into our source? And maybe we can collect some traditional cartoon colors as our color palettes 🙂

I’m not sure if it should go to the source code since it is just a resource. I think that it will be better in the Synfig official repository of resources that I want to be launched as soon as possible. Think that source code is that, source. I think that even examples should be put in a different place.  
Keep it at hand and you can put it in the right place on time.  
-G

---

<div class="post-metadata">

**Author:** ![jcome](https://forums.synfig.org/user_avatar/forums.synfig.org/jcome/32/3512_2.png) [@jcome](https://forums.synfig.org/u/jcome)\
**Post date:** [July 19, 2011, 12:48am UTC](https://forums.synfig.org/t/html-hex-colour-values/1476/9 "2011-07-19T00:48:21Z")

</div>

> [@DaveJ](#):
>
> If you enter the colour values of the Tango palette as RGB percentages rather than using the HTML codes then the colours will be identical to Inkscape.

You are right, the HTML Codes don’t work properly. 😊  
When I use the HTML codes, the colors I get is totally different than they are in Inkscape. I have to save the svg format of palette into pain svg and import it to Synfig Studio, and then I get the “right looking” colors.

---

<div class="post-metadata">

**Author:** ![jcome](https://forums.synfig.org/user_avatar/forums.synfig.org/jcome/32/3512_2.png) [@jcome](https://forums.synfig.org/u/jcome)\
**Post date:** [July 19, 2011, 2:43pm UTC](https://forums.synfig.org/t/html-hex-colour-values/1476/10 "2011-07-19T14:43:17Z")

</div>

The tango color palette .spal file updated with correct color shade.

---

<div class="post-metadata">

**Author:** ![GiUmaTo](https://forums.synfig.org/letter_avatar_proxy/v4/letter/g/77aa72/32.png) [@GiUmaTo](https://forums.synfig.org/u/GiUmaTo)\
**Post date:** [November 23, 2011, 4:59pm UTC](https://forums.synfig.org/t/html-hex-colour-values/1476/11 "2011-11-23T16:59:51Z")

</div>

So, provided that I have a color in Hex RRGGBB value, say #C90B47, which method/ conversion should I apply in order to successfully obtain the “correct” color in Synfig Studio?

I also have tried by directly pasting the Hex RGB in the field “HTML Code”, but it does not seem to work properly. That was with the setting 'Visually Linear Color Selection" both enabled and disabled.

In order to compare colors obtained by Synfig I’m checking both Gimp and Inkscape (just in case).

Thanks for your attention (and for the great SW of course).

---

<div class="post-metadata">

**Author:** ![Genete](https://forums.synfig.org/user_avatar/forums.synfig.org/genete/32/8_2.png) [@Genete](https://forums.synfig.org/u/Genete)\
**Post date:** [November 24, 2011, 2:57pm UTC](https://forums.synfig.org/t/html-hex-colour-values/1476/12 "2011-11-24T14:57:24Z")

</div>

To have exactly same rendered color on the screen you have to adjust the gamma value to 1.0. Default in Synfig is 2.2 and is is hardcoded, so if you change it to gamma=1.0 it would export to gamma=2.2. So usually I don’t believe on html code I look the 0-255 rgb values on Gimp and convert them to 0.0-1.0 values and input them on Synfig color dialog.

I’m so bugged with this behaviour but change it would mean a very big change so I haven’t had time to fix it yet.  
-G

---

<div class="post-metadata">

**Author:** ![GiUmaTo](https://forums.synfig.org/letter_avatar_proxy/v4/letter/g/77aa72/32.png) [@GiUmaTo](https://forums.synfig.org/u/GiUmaTo)\
**Post date:** [November 24, 2011, 11:57pm UTC](https://forums.synfig.org/t/html-hex-colour-values/1476/13 "2011-11-24T23:57:56Z")

</div>

Ok. Thanks for explanation! It’s good to know that there is _a_ way to get there.

Cheers
