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

Dark mode compatible image in rich text items #739

Open
mathebox opened this issue Feb 24, 2020 · 0 comments
Open

Dark mode compatible image in rich text items #739

mathebox opened this issue Feb 24, 2020 · 0 comments

Comments

@mathebox
Copy link
Member

Is your feature request related to a problem? Please describe.
User-uploaded (teaching team) images in rich text items, might be designed for light mode only. Those images can look out of place in dark mode.

Describe the solution you'd like

  1. Identify images: Only images with a white background (main color) or a translucent background should be considered.
  2. Apply CIFilter named CIColorInvert to invert images.

Affected Component
HTMLStyler

Additional context
Get the main color of an image: https://stackoverflow.com/questions/41552544/getting-main-colors-of-a-uiimage-in-swift

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant