Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting config.background doesn't change the colour #17

Open
tinacious opened this issue May 29, 2021 · 0 comments
Open

Setting config.background doesn't change the colour #17

tinacious opened this issue May 29, 2021 · 0 comments

Comments

@tinacious
Copy link

Following the instructions in the readme, setting the config.background to a hex value doesn't actually change the appearance of the generated SVG. I can see that a rectangle with the colour I've indicated is drawn, but it must be layered underneath the others because the appearance of the badge does not change.

This, for example, is the line that is added:

<rect height="20" width="120" rx="3" fill="#FF3399"/>

This is the badge image that is generated:

image

The total badge output is as follows (formatted for readability):

<svg contentScriptType="text/ecmascript" contentStyleType="text/css" preserveAspectRatio="xMidYMid meet" version="1.0"
  height="20" width="120" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  <linearGradient id="smooth" x2="0" y2="120">
    <stop offset="0" stop-color="#bbb" stop-opacity=".1" />
    <stop offset="1" stop-opacity=".1" />
  </linearGradient>
  <clipPath id="round">
    <rect height="20" width="120" rx="3" fill="#FF3399" />
  </clipPath>
  <g clip-path="url(#round)">
    <rect height="20" width="60" fill="#555" />
    <rect x="60" height="20" width="60" fill="#cccc00" />
    <rect height="20" width="120" fill="url(#smooth)" />
  </g>
  <g fill="#fff" text-anchor="middle" font-family="Verdana,sans-serif" font-size="11">
    <text x="30" y="15" fill="#010101" fill-opacity="0.3">
      scov total
    </text>
    <text x="30" y="14">
      scov total
    </text>
  </g>
  <g fill="#fff" text-anchor="middle" font-family="Verdana,sans-serif" font-size="11">
    <text x="90" y="15" fill="#010101" fill-opacity="0.3">
      95%
    </text>
    <text x="90" y="14">
      95%
    </text>
  </g>
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant