Skip to content

Commit

Permalink
feat: WDS bg-color-soft color algo (#36951)
Browse files Browse the repository at this point in the history
## Description
Fixes #36902

## Automation

/ok-to-test tags="@tag.Anvil"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11385450221>
> Commit: 27bdba6
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11385450221&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Anvil`
> Spec:
> <hr>Thu, 17 Oct 2024 13:21:51 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced color adjustments for both dark and light modes, improving
visual representation.
- Dark mode now features refined chroma and lightness for background and
foreground colors.
- Light mode adjustments provide a darker neutral soft background and
lighter hover states.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
ichik authored Oct 17, 2024
1 parent cdc56c0 commit ebec99c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,8 @@ export class DarkModeTheme implements ColorModeTheme {
color.oklch.l = 0.22;
}

if (this.seedChroma > 0.025) {
color.oklch.c = 0.025;
if (this.seedChroma > 0.005) {
color.oklch.c = 0.005;
}

if (this.seedIsAchromatic) {
Expand Down Expand Up @@ -448,15 +448,15 @@ export class DarkModeTheme implements ColorModeTheme {
private get bgNeutralSoftHover() {
const color = this.bgNeutralSoft.clone();

color.oklch.l += 0.01;
color.oklch.l += 0.02;

return color;
}

private get bgNeutralSoftActive() {
const color = this.bgNeutralSoft.clone();

color.oklch.l -= 0.01;
color.oklch.l -= 0.015;

return color;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,23 +432,23 @@ export class LightModeTheme implements ColorModeTheme {
private get bgNeutralSoft() {
const color = this.bgNeutralSubtle.clone();

color.oklch.l -= 0.03;
color.oklch.l -= 0.045;

return color;
}

private get bgNeutralSoftHover() {
const color = this.bgNeutralSoft.clone();

color.oklch.l += 0.01;
color.oklch.l += 0.015;

return color;
}

private get bgNeutralSoftActive() {
const color = this.bgNeutralSoft.clone();

color.oklch.l -= 0.01;
color.oklch.l -= 0.015;

return color;
}
Expand Down

0 comments on commit ebec99c

Please sign in to comment.