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

Help Wanted: Denim Mode product screenshots present too much contrast in Dark Mode #7057

Open
cwarnermm opened this issue Apr 10, 2024 · 1 comment
Labels
Acknowledged/Docs team Issue acknowledged by Docs team, next step pending Area/Content Area/Documentation Improvements Improvements to documentation Difficulty/2:Medium Help Wanted Community help wanted Tech/RST Tech/Sphinx Up for Grabs

Comments

@cwarnermm
Copy link
Member

cwarnermm commented Apr 10, 2024

Context

In the Mattermost Product Documentation, all product captures are taken with Denim.

However, when viewing the product documentation in Dark Mode, product captures are too bright and present too much contrast.

A darker Mattermost theme, such as Onyx may be better suited for Dark Mode screenshots.

However, we want to avoid having to maintain 2 sets of screenshots, one for Light Mode and another for Dark Mode.

What technical options are available to address this issue?

Example:
Screenshot 2024-04-10 031714 (1)

@cwarnermm cwarnermm added the Acknowledged/Docs team Issue acknowledged by Docs team, next step pending label Apr 12, 2024
@cwarnermm cwarnermm changed the title Denim Mode product screenshots present too much contrast in Dark Mode Help Wanted: Denim Mode product screenshots present too much contrast in Dark Mode Sep 24, 2024
@cwarnermm cwarnermm removed the Hacktoberfest null label Nov 1, 2024
@yesbhautik
Copy link
Contributor

yesbhautik commented Nov 5, 2024

To address the issue of high contrast in screenshots when viewed in Dark Mode, we can consider the following technical solutions:

  1. CSS Filter: Apply CSS filters to adjust the brightness and contrast of the images dynamically based on the mode (Light or Dark) the user is in.
   .screenshot {
       filter: brightness(0.8) contrast(1.2);
   }
  1. SVG Overlays: Use SVG overlays to adjust the appearance of the screenshots. This can help in blending the images better with the background.

  2. Dynamic Image Rendering: Use JavaScript to detect the user's theme preference and dynamically adjust the image properties. This can be done by manipulating the CSS or using a library like darkmode-js.

  3. CSS Variables: Define CSS variables for image adjustments and change their values based on the mode.

:root {
       --image-brightness: 1;
       --image-contrast: 1;
   }

   [data-theme="dark"] {
       --image-brightness: 0.8;
       --image-contrast: 1.2;
   }

   .screenshot {
       filter: brightness(var(--image-brightness)) contrast(var(--image-contrast));
   }

By implementing one or a combination of these solutions, we can achieve a more consistent appearance of screenshots across different viewing modes without maintaining separate sets of images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Acknowledged/Docs team Issue acknowledged by Docs team, next step pending Area/Content Area/Documentation Improvements Improvements to documentation Difficulty/2:Medium Help Wanted Community help wanted Tech/RST Tech/Sphinx Up for Grabs
Projects
None yet
Development

No branches or pull requests

2 participants