Bump contrast of secondary color in light themes
This commit is contained in:
parent
53c059bf88
commit
f350db7c8c
1 changed files with 5 additions and 3 deletions
|
|
@ -529,9 +529,11 @@ pub struct Secondary {
|
||||||
impl Secondary {
|
impl Secondary {
|
||||||
/// Generates a set of [`Secondary`] colors from the base and text colors.
|
/// Generates a set of [`Secondary`] colors from the base and text colors.
|
||||||
pub fn generate(base: Color, text: Color) -> Self {
|
pub fn generate(base: Color, text: Color) -> Self {
|
||||||
let weak = mix(deviate(base, 0.1), text, 0.2);
|
let factor = if is_dark(base) { 0.2 } else { 0.4 };
|
||||||
let strong = mix(deviate(base, 0.3), text, 0.2);
|
|
||||||
let base = mix(deviate(base, 0.2), text, 0.2);
|
let weak = mix(deviate(base, 0.1), text, factor);
|
||||||
|
let strong = mix(deviate(base, 0.3), text, factor);
|
||||||
|
let base = mix(deviate(base, 0.2), text, factor);
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
base: Pair::new(base, text),
|
base: Pair::new(base, text),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue