diff --git a/change/@fluentui-web-components-96aa46da-3632-4061-a3c0-b9d1f63d93e1.json b/change/@fluentui-web-components-96aa46da-3632-4061-a3c0-b9d1f63d93e1.json new file mode 100644 index 0000000000000..0d2cd3011766c --- /dev/null +++ b/change/@fluentui-web-components-96aa46da-3632-4061-a3c0-b9d1f63d93e1.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Fixes low contrast in dark mode for web component badge", + "packageName": "@fluentui/web-components", + "email": "ryan@ryanmerrill.net", + "dependentChangeType": "patch" +} diff --git a/packages/web-components/src/styles/partials/badge.partials.ts b/packages/web-components/src/styles/partials/badge.partials.ts index 8eb4c7be7cde1..8ef33701f8778 100644 --- a/packages/web-components/src/styles/partials/badge.partials.ts +++ b/packages/web-components/src/styles/partials/badge.partials.ts @@ -11,6 +11,7 @@ import { colorNeutralBackground4, colorNeutralBackground5, colorNeutralForeground1, + colorNeutralForeground1Static, colorNeutralForeground3, colorNeutralForegroundInverted, colorNeutralForegroundOnBrand, @@ -188,7 +189,7 @@ export const badgeFilledStyles = css.partial` :host([color='warning']) { background-color: ${colorPaletteYellowBackground3}; - color: ${colorNeutralForeground1}; + color: ${colorNeutralForeground1Static}; } `; @@ -198,7 +199,7 @@ export const badgeFilledStyles = css.partial` */ export const badgeGhostStyles = css.partial` :host([appearance='ghost']) { - color: ${colorBrandBackground}; + color: ${colorBrandForeground1}; background-color: initial; }