chore: refine WDS color bdAccent (#23872)

## Description

tl;dr Smoother fallbacks when we're failing APCA contrast check as a
border for the seed (more chroma, closer to the neutral lightness)

Fixes #22630   

## Media
New on the left, current on the right


https://github.com/appsmithorg/appsmith/assets/80973/b13122c8-9159-4337-ae77-4dfa2df2151d



## Type of change

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Chore (housekeeping or task changes that don't impact user perception)


## How Has This Been Tested?

- Manual

### Test Plan
Initial POC refinement, no testing necessary

## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
This commit is contained in:
vadim 2023-05-30 14:36:54 +02:00 committed by GitHub
parent 76d4a7aa3f
commit 350f9b616f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -186,13 +186,13 @@ export class DarkModeTheme implements ColorModeTheme {
if (this.bg.contrastAPCA(this.seedColor) >= -25) {
if (this.seedIsAchromatic) {
color.oklch.l = 0.985;
color.oklch.l = 0.82;
color.oklch.c = 0;
return color;
}
color.oklch.l = 0.985;
color.oklch.c = 0.016;
color.oklch.l = 0.75;
color.oklch.c = 0.15;
return color;
}

View File

@ -287,13 +287,13 @@ export class LightModeTheme implements ColorModeTheme {
if (this.bg.contrastAPCA(this.seedColor) <= 25) {
if (this.seedIsAchromatic) {
color.oklch.l = 0.15;
color.oklch.l = 0.3;
color.oklch.c = 0;
return color;
}
color.oklch.l = 0.15;
color.oklch.c = 0.064;
color.oklch.l = 0.55;
color.oklch.c = 0.25;
return color;
}