Comments (5)
im not sure how much moral agreement i have with having dark mode an officially sanctioned feature
from qboard.
There are two possible things you might want to do. Please let us know which you want so we can work on it.
(I will soon be releasing a toolkit of bookmarklets or a browser extension that implements a number of power user scripts. The following workarounds will be included.)
You want the view to be dark, but the exports to have the proper color scheme
Temporary solution: execute this script:
var aviThemeToggle=!aviThemeToggle;document.querySelectorAll(":root").forEach(el=>{el.style.background="white";el.style.filter=aviThemeToggle?"invert(1) hue-rotate(180deg)":""});document.querySelectorAll("body main").forEach(el=>{el.style.background="white";})
You want the entire board to become a blackboard
Temporary solution: #160 (comment) includes a snippet:
qboard.baseCanvas.setBackgroundColor("#111").renderAll()
that will convert the current page to a blackboard. It does not turn the black pen into a white pen, nor does it change the color in which LaTeX renders. To change the behavior of the black pen into drawing white, use another script from #160 (comment):
qboard.action.actionMap.black = () => qboard.action.setStroke("#fff")
and to change the LaTeX colors, just use the \color
command in the TeX (#159 will allow you to do this only once, instead of every time you insert LaTeX).
Any new pages added will still be white; there is no way to change this behavior (see #206 for details) without editing internal functions, which is not recommended.
from qboard.
an officially sanctioned feature
Yes, if @Ii-xD-iI means the first option, I don't support this either. It feels wrong to support having the actual file content look different from what the file creator sees, especially when workaround like my script above work well. I opened #207, so that users get finer control over their own client's theme, but I think most will be fine with the existing script.
On the other hand, I am in full support of the second option. I see no reason not to allow customizing the page color (will be possible for developers with #206), and changing the pen colors has already been proposed in #170 and #169.
One thing to be mindful of is that if one switches to a blackboard, and still wants to make the toolbar/modals/context menu dark, they can't use the dark theme script I provided, since this would invert the colors that the user has already set (for the board and the pens). I do think that we should do something to support this: either the CSS variables trick (#207) or a dark mode that only touches the toolbar/modals/context menu and not the board; I think we should do both of these, actually. Then, we should be smart enough to use the browser's prefers-color-scheme
to choose the default color scheme.
from qboard.
There are two possible things you might want to do. Please let us know which you want so we can work on it.
(I will soon be releasing a toolkit of bookmarklets or a browser extension that implements a number of power user scripts. The following workarounds will be included.)
You want the view to be dark, but the exports to have the proper color scheme
Temporary solution: execute this script:
var aviThemeToggle=!aviThemeToggle;document.querySelectorAll(":root").forEach(el=>{el.style.background="white";el.style.filter=aviThemeToggle?"invert(1) hue-rotate(180deg)":""});document.querySelectorAll("body main").forEach(el=>{el.style.background="white";})You want the entire board to become a blackboard
Temporary solution: #160 (comment) includes a snippet:
qboard.baseCanvas.setBackgroundColor("#111").renderAll()that will convert the current page to a blackboard. It does not turn the black pen into a white pen, nor does it change the color in which LaTeX renders. To change the behavior of the black pen into drawing white, use another script from #160 (comment):
qboard.action.actionMap.black = () => qboard.action.setStroke("#fff")and to change the LaTeX colors, just use the
\color
command in the TeX (#159 will allow you to do this only once, instead of every time you insert LaTeX).Any new pages added will still be white; there is no way to change this behavior (see #206 for details) without editing internal functions, which is not recommended.
in the continuation of this thread,
I feel like the 2nd option stated by @pihart seems more precise with what I've been looking for
from qboard.
Ok, I feel like this is a good idea, but it depends on a number of other changes which would need to be done earlier.
from qboard.
Related Issues (20)
- Don't hard-code tab behavior HOT 2
- Store source TeX in `Image` object, serialize
- Minor cleanups
- Eraser performance: don't remove/check `objects.length` multiple times
- How come Laser requires re-render but Eraser doesn't? HOT 1
- Node types should not be used
- React types should be a proper dependency
- Add `UnTeX` option to context menu
- Make `defaultPageJSON` a class variable
- Use variables for CSS colors HOT 1
- Drop LaTeX images at cursor position
- Arrow keys to move objects
- Override Shift + key bindings HOT 2
- Clear [file's] IDs on file open?
- Copy/paste/paste-external in context menu
- `preventDefault()` on successful keybinding activation
- multiuser
- GIthub pages vesrion
- npm run build on Netlify fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qboard.