# Why font colors disappear in HTML report?

**URL:** <https://gramps.discourse.group/t/why-font-colors-disappear-in-html-report/9280>\
**Category:** Development\
**Tags:** third-party-addon, style-editor\
**Created:** [March 28, 2026, 9:40pm UTC](https://gramps.discourse.group/t/why-font-colors-disappear-in-html-report/9280 "2026-03-28T21:40:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bforest76](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/bforest76/32/8401_2.png) [@bforest76](https://gramps.discourse.group/u/bforest76)\
**Post date:** [March 28, 2026, 9:40pm UTC](https://gramps.discourse.group/t/why-font-colors-disappear-in-html-report/9280/1 "2026-03-28T21:40:34Z")

</div>

When I tested my addon (Ancestry Table Report) I was surprised that Gramps generates a HTML report in black and white even if I choose font colors in the style editor.

After a quick search in the code, in htmldoc.py I found “Color is removed to avoid conflicts with the css.“. At the beginning I didn’t understand where a conflict could be possible because I didn’t see the HTML Options tab. Now I think I understood and I have a suggestion. I suggest leaving the font color as is when no css is selected.

If you agree I could write the modification in the “build\_style\_declaration” function.

Or is there another thing that I didn’t understand ? Another way to apply the styles defined with the style editor ?

Let me know.

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [March 28, 2026, 10:46pm UTC](https://gramps.discourse.group/t/why-font-colors-disappear-in-html-report/9280/2 "2026-03-28T22:46:19Z")

</div>

> [@bforest76](#):
>
> I suggest leaving the font color as is when no css is selected.

That seems reasonable to me.

---

<div class="post-metadata">

**Author:** ![bforest76](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/bforest76/32/8401_2.png) [@bforest76](https://gramps.discourse.group/u/bforest76)\
**Post date:** [March 29, 2026, 12:54pm UTC](https://gramps.discourse.group/t/why-font-colors-disappear-in-html-report/9280/3 "2026-03-29T12:54:20Z")

</div>

Nice !

Before I begin the modifications, is there special instruction or special method to follow ? If not, I will create a branch, make the modifications, test them locally, push them and create a PR.

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [March 29, 2026, 1:18pm UTC](https://gramps.discourse.group/t/why-font-colors-disappear-in-html-report/9280/4 "2026-03-29T13:18:02Z")

</div>

No special instructions. Work in a new branch and create a PR when ready.

---

<div class="post-metadata">

**Author:** ![bforest76](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/bforest76/32/8401_2.png) [@bforest76](https://gramps.discourse.group/u/bforest76)\
**Post date:** [April 1, 2026, 9:59pm UTC](https://gramps.discourse.group/t/why-font-colors-disappear-in-html-report/9280/5 "2026-04-01T21:59:27Z")

</div>

Still something I didn’t understand with git… I explain.

I cloned Gramps with this command : `git clone git@github.com:gramps-project/gramps.git Gramps`

I created a branch with this command : `git checkout –b bruno-htmldoc-color --track origin/maintenance/gramps60`

I modified the file Gramps/gramps/plugins/docgen/htmldoc.py.

I added this file with this command : `git add .`

I commited : `git commit -m “Keep font color and font face when no stylesheet is selected”`

Everything seems to be OK. `git status` shows :  
`* bruno-htmldoc-color 5b5c1642a8 [en avance de 1] Keep font color and font face when no stylesheet is selected `  
` master 41258bdc42 Merge branch 'gramps60'`

BUT `git push origin bruno-htmldoc-color` gives me an error :  
`ERROR: Permission to gramps-project/gramps.git denied to bforest76. `  
`fatal: Impossible to read the remote repository.` (or something like that in french that I translated)

What’s wrong ? I precise I don’t want to have too much access (too dangerous with a beginer like me ! 😄). I can begin from the start if necessary, it’s not a problem to me. I just need some explanation and the right process.

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [April 1, 2026, 10:10pm UTC](https://gramps.discourse.group/t/why-font-colors-disappear-in-html-report/9280/6 "2026-04-01T22:10:17Z")

</div>

> [@bforest76](#):
>
> BUT `git push origin bruno-htmldoc-color` gives me an error

You should create a clone of the _gramps_ repository in GitHub add then add it as a remote. Then push your branch to your clone rather than to _origin_.

I would do the following:

```python
git checkout –b gramps60 --track origin/maintenance/gramps60
git checkout –b bruno-htmldoc-color

```

To create a remote called _bruno_ pointing to your clone you will need a command like:

```python
git remote add bruno git@github.com:bruno/gramps.git

```

Then to keep your branch up-to-date:

```python
git checkout gramps60
git pull
git checkout bruno-htmldoc-color
git rebase gramps60

```

When you want to create a pull request:

```python
git push bruno bruno-htmldoc-color

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [May 1, 2026, 10:10pm UTC](https://gramps.discourse.group/t/why-font-colors-disappear-in-html-report/9280/7 "2026-05-01T22:10:25Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
