chialab / math-api

➗ Serverless API to render maths using MathJax for Node.
MIT License
43 stars 8 forks source link

Adjustable text color #25

Open jemand771 opened 3 years ago

jemand771 commented 3 years ago

Feature Request

I'm suggesting to add a parameter for changing the output text color (default: black). Maybe forcing a background color (instead of transparency) for png outputs could also be a useful option.

Reasoning

I mainly use a self-hosted math-api instance for quickly typing out formulas in chats that don't have native LaTeX rendering or a bot that can do that. Most online chat platforms render links to images directly as inline images in chat.

The discord mobile app offers a "super dark" oled theme with an all-black background. For users of the app, transparent PNGs with black text will just appear as an endless void.

Screenshots ### Gallery original image: ![render](https://user-images.githubusercontent.com/19669567/139406939-06df52f3-9d39-45f8-b838-e800826c2642.png) (I realize that using the github dark theme, you can barely see it) "regular" (desktop) dark theme: ![image](https://user-images.githubusercontent.com/19669567/139406527-d4d542ae-dc42-44ee-bc87-537463e275f0.png) oled theme: ![image](https://user-images.githubusercontent.com/19669567/139406603-9d6a974b-a83f-4131-b6c4-f57cb462328d.png)