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

Tex command: colour inversion #373

Open
classabbyamp opened this issue Mar 22, 2021 · 7 comments
Open

Tex command: colour inversion #373

classabbyamp opened this issue Mar 22, 2021 · 7 comments
Assignees
Labels
enhancement New feature or request investigate This issue needs investigation priority-low This issue can be worked on later

Comments

@classabbyamp
Copy link
Member

classabbyamp commented Mar 22, 2021

#371 (comment)

@classabbyamp classabbyamp added enhancement New feature or request old/question Further information is requested priority-low This issue can be worked on later investigate This issue needs investigation labels Mar 22, 2021
@classabbyamp classabbyamp mentioned this issue Mar 22, 2021
8 tasks
@0x5c
Copy link
Member

0x5c commented Mar 22, 2021

I can already say that PIL is not going to be nice at all.

Aliasing will be an issue, but so will be PIL's tremendous slowness (blocking in the breaks-the-loop sense)

@classabbyamp
Copy link
Member Author

rtex supports pdf output. maybe there could be some pdf -> svg -> png conversion in there? sounds somewhat cursed tho

@0x5c
Copy link
Member

0x5c commented Mar 23, 2021

Is styling just not supported by the renderer?

@classabbyamp
Copy link
Member Author

it can be done in the latex, but that can mess up some of the styling people input. would be interesting to see how mathbot does it.

@thxo do you know of any way to invert the document in latex?

@thxo
Copy link
Contributor

thxo commented Mar 23, 2021

The easiest way is probably just manually setting the page and text colours to something dark and something light, respectively:

sample tikz graphic and equation under a dark background

I did some experimenting and it looks like tikz follows the text colour as well. It is not perfect in all situations (e.g., if we get a manually selected dark blue, we can't invert that color when the page turns dark to make it light), but it works for most cases.

@classabbyamp
Copy link
Member Author

well I guess that's the same issue if someone manually selects white for something on a white background.

I suggest adding a second template with dark discord background (#2C2F33) and white default (#FFFFFF) foreground to qrm-resources (e.g. template_dark.#.tex) and a config switch to switch between the two.

(maybe a flag on the command too?)

@classabbyamp classabbyamp removed investigate This issue needs investigation priority-low This issue can be worked on later old/question Further information is requested labels Mar 23, 2021
@0x5c
Copy link
Member

0x5c commented Mar 24, 2021

Might be starting to feature creep a bit
Since the goal is not typesetting papers on the bot, I think it's safe to assume that colour styling won't be needed much, and that fg #fff and bg #2c2f33 is perfectly fine for the application

We could also aim for the background to match the one of embeds, but there's also that desktop/android/ios versions of discord don't agree on background colour

@0x5c 0x5c modified the milestones: v2.7.0 - Majorer Refactor, now? Mar 24, 2021
@0x5c 0x5c added priority-low This issue can be worked on later investigate This issue needs investigation labels Mar 28, 2021
@0x5c 0x5c changed the title explore colour inversion in tex command? Tex command: colour inversion Apr 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request investigate This issue needs investigation priority-low This issue can be worked on later
Projects
None yet
Development

No branches or pull requests

3 participants