Closed kohheepeace closed 9 months ago
I should use SchemeType.MONOCHROME
instead of SchemeType.FIDELITY
in this case.
The below one is dark mode Navbar with SchemeType.MONOCHROME
. It works as expected 😁
To accommodate this, I will provide a checkbox for monochrome, in addition to the input for color selection.
I will close this issue. Thanks for awesome library 👍
Hello, I am currently developing a feature using
SchemeFidelity
that allows users to select their own primary color by #hex and automatically set the site's theme color.An example of its use in the Navbar is shown below. Of particular note is the "
Sign Up
" button. This button usesprimary-container
for the background andon-primary-container
for the text color.Problems
As shown in Example 2 below, using
SchemeFidelity
causes problems in dark mode"Sign Up" Button
when the user selects#000000
(black).Questions
Is this problem a bug? Or is it a specification?
Ideally I would like it to work like Vercel.com shown in Example 3.
Any suggestions would be appreciated.
Example 1: user selected primary color is
#411cc4
✅ In this case the behavior is as expected.
--md-sys-color-primary-container: 81 52 211;
--md-sys-color-on-primary-container: 250 245 255;
--md-sys-color-primary-container: 56 5 188;
--md-sys-color-on-primary-container: 210 202 255;
Example 2: primary color is
#000000
❌ I am concerned about readability in dark mode when
#000000
is selected.--md-sys-color-primary-container: 38 38 38;
--md-sys-color-on-primary-container: 177 177 177;
--md-sys-color-primary-container: 0 0 0;
--md-sys-color-on-primary-container: 150 150 150;
Example 3: Vercel.com
✅ Example2 would ideally have a color scheme like this in dark mode.