github-profile-3d-contrib icon indicating copy to clipboard operation
github-profile-3d-contrib copied to clipboard

Added backgroundOpacity option

Open MrKragh opened this issue 2 years ago • 2 comments

Hi there!

Thank you for this awesome project! I'm kind of lazy in terms of pleasing light/dark modes, and usually try to fix with a transparent background, and seemed like I could do that for my own Github Person page.

Anyhow, just wanted to contribute back so here is a PR.

To use add in the following to the JSON. "backgroundOpacity": 0.0 to make totally transparent and "backgroundOpacity": 1.0 is solid.

I know nothing about TypeScript , just call me Jon Snow! Hope I did it right by your standards and the PR makes sense.

MrKragh avatar Jan 01 '24 22:01 MrKragh

@MrKragh Thank you for your pull request.

I understand that you want to set transparency as the background color when using custom json file by specifying the SETTING_JSON environment variable.

In fact, even in the current version, you can specify a color with transparency, for example by doing the following.

 {
   "type": "normal",
   "fileName": "profile-custom-evergreen.svg",
-  "backgroundColor": "#ffffff",
+  "backgroundColor": "rgba(255,255,255,0.3)",
   "foregroundColor": "#00000f",
   "strongColor": "#111133",
   "weakColor": "gray",
   "radarColor": "#47a042",
   "growingAnimation": true,
   "contribColors": [
     "#efefef",
     "#d8e887",
     "#8cc569",
     "#47a042",
     "#1d6a23"
   ]
 }

Also, I think that adding backgroundOpacity as a required field would have a significant impact on people who are already using custom json file. Of course, it could be made optional. But I think adding backgroundOpacity is unnecessary at this time.

If you have any other suggestions, please feel free to send us a pull request. Thank you.

yoshi389111 avatar Mar 07 '25 08:03 yoshi389111

I thought there might be other people who want a transparent background but don't realize that it's possible.

If you don't mind, could you resubmit the merge request without the source code modifications and with a custom JSON file with a transparent background in sample-settings/?

That way, it will be easier for users to notice that a transparent background is possible.

Thank you in advance.

yoshi389111 avatar Mar 08 '25 03:03 yoshi389111

I'm going to close this issue/PR due to inactivity. If you're still interested in pursuing this, feel free to reopen it or open a new one. Thank you for your contribution!

yoshi389111 avatar Jul 22 '25 13:07 yoshi389111