diff --git a/change/@fluentui-web-components-f81d3aa5-c0aa-46c6-972f-774e69c15d79.json b/change/@fluentui-web-components-f81d3aa5-c0aa-46c6-972f-774e69c15d79.json new file mode 100644 index 0000000000000..5bf9f3fbc44d8 --- /dev/null +++ b/change/@fluentui-web-components-f81d3aa5-c0aa-46c6-972f-774e69c15d79.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Removed accent fill direction handling to standardize foreground text color", + "packageName": "@fluentui/web-components", + "email": "47367562+bheston@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/packages/web-components/src/color/recipes/accent-fill.ts b/packages/web-components/src/color/recipes/accent-fill.ts index dae18c6a99546..ea99179bf71ea 100644 --- a/packages/web-components/src/color/recipes/accent-fill.ts +++ b/packages/web-components/src/color/recipes/accent-fill.ts @@ -17,13 +17,11 @@ export function accentFill( neutralFillActiveDelta: number, ): InteractiveSwatchSet { const accent = palette.source; - const referenceIndex = neutralPalette.closestIndexOf(reference); - const swapThreshold = Math.max(neutralFillRestDelta, neutralFillHoverDelta, neutralFillActiveDelta); - const direction = referenceIndex >= swapThreshold ? -1 : 1; + const direction = 1; const accentIndex = palette.closestIndexOf(accent); - const hoverIndex = accentIndex; - const restIndex = hoverIndex + direction * -1 * hoverDelta; + const restIndex = accentIndex; + const hoverIndex = restIndex + direction * hoverDelta; const activeIndex = restIndex + direction * activeDelta; const focusIndex = restIndex + direction * focusDelta;