Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

style(ui): tint hover and highlight fills toward the accent

Josh Corbettbc504bdc89ea
diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/picker/GalleryPickerView.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/picker/GalleryPickerView.tsx
index 7a931cdc2d..f0083e31b2 100644
--- a/invokeai/frontend/webv2/src/features/gallery/ui/picker/GalleryPickerView.tsx
+++ b/invokeai/frontend/webv2/src/features/gallery/ui/picker/GalleryPickerView.tsx
@@ -40,7 +40,7 @@ import { GalleryPickerBoards, type GalleryPickerBoardGroup } from './GalleryPick
import { galleryPickerOptionId, GalleryPickerGrid } from './GalleryPickerGrid';
import { useGalleryPickerScope } from './useGalleryPickerScope';
-const BOARD_BUTTON_EXPANDED_PROPS = { bg: 'bg.emphasized' } as const;
+const BOARD_BUTTON_EXPANDED_PROPS = { bg: 'bg.hover' } as const;
/** Unseeded until the first page loads; then the Gallery's selection if it is on that page, else nothing. */
type ActiveKeyState = GalleryItemKey | null | undefined;
diff --git a/invokeai/frontend/webv2/src/features/generation/ui/GeneratePresetsPopover.tsx b/invokeai/frontend/webv2/src/features/generation/ui/GeneratePresetsPopover.tsx
index b1fa459228..616bd23a8b 100644
--- a/invokeai/frontend/webv2/src/features/generation/ui/GeneratePresetsPopover.tsx
+++ b/invokeai/frontend/webv2/src/features/generation/ui/GeneratePresetsPopover.tsx
@@ -33,7 +33,7 @@ import { PANEL_HEADER_CONTROL_HEIGHT, PromptPanelHeader } from './promptFields/P
const POPOVER_POSITIONING = { placement: 'bottom-end' } as const;
const SEARCH_START_ELEMENT = <Icon as={SearchIcon} boxSize="3" color="fg.subtle" />;
// The rows sit on the popover's `bg.muted` surface; hover one surface step up.
-const PRESET_ROW_HOVER_PROPS = { bg: 'bg.emphasized/60' };
+const PRESET_ROW_HOVER_PROPS = { bg: 'bg.hover' };
const PRESET_ROW_SEPARATOR = <Separator borderColor="border.subtle" />;
/** Below this many presets, a search box is more furniture than help. */
const SEARCH_VISIBLE_MIN_PRESETS = 6;
diff --git a/invokeai/frontend/webv2/src/features/generation/ui/promptFields/DynamicPromptsPanel.tsx b/invokeai/frontend/webv2/src/features/generation/ui/promptFields/DynamicPromptsPanel.tsx
index 4ee1ce83e5..84e0327337 100644
--- a/invokeai/frontend/webv2/src/features/generation/ui/promptFields/DynamicPromptsPanel.tsx
+++ b/invokeai/frontend/webv2/src/features/generation/ui/promptFields/DynamicPromptsPanel.tsx
@@ -24,7 +24,7 @@ import { useTranslation } from 'react-i18next';
const MAX_PREVIEW_ROWS = 200;
const TABULAR_NUMS = { fontVariantNumeric: 'tabular-nums' } as const;
// Use a hover fill distinct from the popover's muted surface.
-const PROMPT_ROW_HOVER_PROPS = { bg: 'bg.emphasized/60' } as const;
+const PROMPT_ROW_HOVER_PROPS = { bg: 'bg.hover' } as const;
// Keep preview text readable while interactions are disabled.
const DISABLED_PROMPT_ROW_PROPS = { cursor: 'default', opacity: 1 } as const;
const NO_HOVER_PROPS = { bg: 'transparent' } as const;
diff --git a/invokeai/frontend/webv2/src/features/generation/ui/promptFields/PromptTemplatesPanel.tsx b/invokeai/frontend/webv2/src/features/generation/ui/promptFields/PromptTemplatesPanel.tsx
index 18ba7f2319..5d76869766 100644
--- a/invokeai/frontend/webv2/src/features/generation/ui/promptFields/PromptTemplatesPanel.tsx
+++ b/invokeai/frontend/webv2/src/features/generation/ui/promptFields/PromptTemplatesPanel.tsx
@@ -28,7 +28,7 @@ import { useTranslation } from 'react-i18next';
const THUMBNAIL_SIZE = '7';
// Use a distinct hover fill on bg.muted surfaces.
-const TEMPLATE_ROW_HOVER_PROPS = { bg: 'bg.emphasized/60' };
+const TEMPLATE_ROW_HOVER_PROPS = { bg: 'bg.hover' };
const TEMPLATE_THUMBNAIL_FALLBACK = (
<Box
alignItems="center"
diff --git a/invokeai/frontend/webv2/src/features/generation/ui/promptFields/PromptTriggerAutocomplete.tsx b/invokeai/frontend/webv2/src/features/generation/ui/promptFields/PromptTriggerAutocomplete.tsx
index 9a955a547c..a636e8c269 100644
--- a/invokeai/frontend/webv2/src/features/generation/ui/promptFields/PromptTriggerAutocomplete.tsx
+++ b/invokeai/frontend/webv2/src/features/generation/ui/promptFields/PromptTriggerAutocomplete.tsx
@@ -15,7 +15,7 @@ const LIST_WIDTH_PX = 260;
const MAX_LIST_HEIGHT_PX = 220;
const CARET_GAP_PX = 4;
const VIEWPORT_MARGIN_PX = 8;
-const OPTION_HOVER_CSS = { bg: 'bg.emphasized' };
+const OPTION_HOVER_CSS = { bg: 'bg.hover' };
export const PromptTriggerAutocomplete = ({
activeIndex,
@@ -141,7 +141,7 @@ const AutocompleteOption = ({
return (
<Box
aria-selected={isActive}
- bg={isActive ? 'bg.emphasized' : undefined}
+ bg={isActive ? 'bg.hover' : undefined}
color="fg"
fontSize="md"
id={id}
diff --git a/invokeai/frontend/webv2/src/features/workflow/ui/editor/AddNodeDialog.tsx b/invokeai/frontend/webv2/src/features/workflow/ui/editor/AddNodeDialog.tsx
index 1b46dc644d..c975cb30e3 100644
--- a/invokeai/frontend/webv2/src/features/workflow/ui/editor/AddNodeDialog.tsx
+++ b/invokeai/frontend/webv2/src/features/workflow/ui/editor/AddNodeDialog.tsx
@@ -35,7 +35,7 @@ const UTILITY_CATEGORY = 'Utility';
const CATEGORY_ROW_HEIGHT_PX = 28;
const NODE_ROW_HEIGHT_PX = 44;
const RESULT_LIST_ID = 'add-node-dialog-results';
-const ROW_HOVER_PROPS = { bg: 'bg.emphasized' };
+const ROW_HOVER_PROPS = { bg: 'bg.hover' };
const VIRTUALIZER_INITIAL_RECT = { height: 384, width: 0 };
const toCategoryLabel = (value: string): string =>
@@ -211,7 +211,7 @@ const NodeResultRow = ({
as="button"
aria-level={level}
aria-selected={isActive}
- bg={isActive ? 'bg.emphasized' : undefined}
+ bg={isActive ? 'bg.hover' : undefined}
role="treeitem"
tabIndex={-1}
_hover={ROW_HOVER_PROPS}
@@ -271,7 +271,7 @@ const CategoryHeaderRow = ({
aria-expanded={isExpanded}
aria-level={1}
aria-selected={isActive}
- bg={isActive ? 'bg.emphasized' : undefined}
+ bg={isActive ? 'bg.hover' : undefined}
role="treeitem"
tabIndex={-1}
_hover={ROW_HOVER_PROPS}
diff --git a/invokeai/frontend/webv2/src/platform/ui/Picker.tsx b/invokeai/frontend/webv2/src/platform/ui/Picker.tsx
index 7bf02d3aea..10b7106f84 100644
--- a/invokeai/frontend/webv2/src/platform/ui/Picker.tsx
+++ b/invokeai/frontend/webv2/src/platform/ui/Picker.tsx
@@ -305,7 +305,7 @@ const PickerOptionRow = <T,>({
<Box
aria-disabled={isDisabled || undefined}
aria-selected={isSelected}
- bg={isActive && !isDisabled ? 'bg.emphasized' : undefined}
+ bg={isActive && !isDisabled ? 'bg.hover' : undefined}
cursor={isDisabled ? 'not-allowed' : undefined}
data-active={isActive ? '' : undefined}
data-picker-option-id={id}
diff --git a/invokeai/frontend/webv2/src/platform/ui/theme/__fixtures__/legacyTokenBaseline.json b/invokeai/frontend/webv2/src/platform/ui/theme/__fixtures__/legacyTokenBaseline.json
index e962a4a514..642f61e1bd 100644
--- a/invokeai/frontend/webv2/src/platform/ui/theme/__fixtures__/legacyTokenBaseline.json
+++ b/invokeai/frontend/webv2/src/platform/ui/theme/__fixtures__/legacyTokenBaseline.json
@@ -6,7 +6,7 @@
"bg.panel": "oklch(28.8% 0.018 264.3)",
"bg.emphasized": "oklch(34% 0.02 264.3)",
"bg.inset": "oklch(18.8% 0.014 264.4)",
- "bg.hover": "color-mix(in oklab, color-mix(in oklab, oklch(77.738% 0.1 231.76) 40%, oklch(96% 0.006 264.5)) 8%, transparent)",
+ "bg.hover": "color-mix(in oklab, color-mix(in oklab, oklch(77.738% 0.1 231.76) 55%, oklch(96% 0.006 264.5)) 10%, transparent)",
"bg.error": "color-mix(in oklab, oklch(70.61% 0.0841 19.38) 14%, oklch(23.8% 0.016 264.35))",
"bg.success": "color-mix(in oklab, oklch(79.8% 0.1132 141.63) 14%, oklch(23.8% 0.016 264.35))",
"bg.warning": "color-mix(in oklab, oklch(76.62% 0.0612 62.9) 14%, oklch(23.8% 0.016 264.35))",
@@ -54,7 +54,7 @@
"bg.panel": "oklch(97% 0.003 264)",
"bg.emphasized": "oklch(93.5% 0.005 264)",
"bg.inset": "oklch(96% 0.0038 264)",
- "bg.hover": "color-mix(in oklab, color-mix(in oklab, oklch(54.615% 0.2152 262.88) 40%, oklch(22.5% 0.013 264)) 8%, transparent)",
+ "bg.hover": "color-mix(in oklab, color-mix(in oklab, oklch(54.615% 0.2152 262.88) 55%, oklch(22.5% 0.013 264)) 10%, transparent)",
"bg.error": "color-mix(in oklab, oklch(55.509% 0.1707 24.62) 14%, oklch(99.4% 0.002 264))",
"bg.success": "color-mix(in oklab, oklch(53% 0.15 150) 14%, oklch(99.4% 0.002 264))",
"bg.warning": "color-mix(in oklab, oklch(60% 0.13 72) 14%, oklch(99.4% 0.002 264))",
@@ -102,7 +102,7 @@
"bg.panel": "oklch(21% 0.021 184)",
"bg.emphasized": "oklch(25.5% 0.026 183)",
"bg.inset": "oklch(16.5% 0.015 184)",
- "bg.hover": "color-mix(in oklab, color-mix(in oklab, oklch(72% 0.105 195) 40%, oklch(92% 0.028 178)) 8%, transparent)",
+ "bg.hover": "color-mix(in oklab, color-mix(in oklab, oklch(72% 0.105 195) 55%, oklch(92% 0.028 178)) 10%, transparent)",
"bg.error": "color-mix(in oklab, oklch(69.5% 0.147 33) 14%, oklch(18.5% 0.017 184))",
"bg.success": "color-mix(in oklab, oklch(78% 0.15 155) 14%, oklch(18.5% 0.017 184))",
"bg.warning": "color-mix(in oklab, oklch(80% 0.12 78) 14%, oklch(18.5% 0.017 184))",
@@ -150,7 +150,7 @@
"bg.panel": "oklch(22.213% 0 0)",
"bg.emphasized": "oklch(27.274% 0 0)",
"bg.inset": "oklch(18.22% 0 0)",
- "bg.hover": "color-mix(in oklab, color-mix(in oklab, oklch(68.622% 0 0) 40%, oklch(93.1% 0 0)) 8%, transparent)",
+ "bg.hover": "color-mix(in oklab, color-mix(in oklab, oklch(68.622% 0 0) 55%, oklch(93.1% 0 0)) 10%, transparent)",
"bg.error": "color-mix(in oklab, oklch(71.115% 0.0934 19.64) 14%, oklch(20.019% 0 0))",
"bg.success": "color-mix(in oklab, oklch(76% 0.06 150) 14%, oklch(20.019% 0 0))",
"bg.warning": "color-mix(in oklab, oklch(79% 0.07 80) 14%, oklch(20.019% 0 0))",
@@ -198,7 +198,7 @@
"bg.panel": "oklch(14.5% 0.003 250)",
"bg.emphasized": "oklch(19% 0.004 250)",
"bg.inset": "oklch(0% 0 0)",
- "bg.hover": "color-mix(in oklab, color-mix(in oklab, oklch(80.623% 0.1248 228.24) 40%, oklch(89% 0.008 250)) 8%, transparent)",
+ "bg.hover": "color-mix(in oklab, color-mix(in oklab, oklch(80.623% 0.1248 228.24) 55%, oklch(89% 0.008 250)) 10%, transparent)",
"bg.error": "color-mix(in oklab, oklch(71.161% 0.1812 22.84) 14%, oklch(11.5% 0.003 250))",
"bg.success": "color-mix(in oklab, oklch(76.5% 0.16 150.5) 14%, oklch(11.5% 0.003 250))",
"bg.warning": "color-mix(in oklab, oklch(79.5% 0.13 80) 14%, oklch(11.5% 0.003 250))",
@@ -246,7 +246,7 @@
"bg.panel": "oklch(24.29% 0.0304 283.91)",
"bg.emphasized": "oklch(32.4% 0.0319 281.98)",
"bg.inset": "oklch(18.28% 0.0204 284.2)",
- "bg.hover": "color-mix(in oklab, color-mix(in oklab, oklch(76.64% 0.1113 259.88) 40%, oklch(87.87% 0.0426 272.28)) 8%, transparent)",
+ "bg.hover": "color-mix(in oklab, color-mix(in oklab, oklch(76.64% 0.1113 259.88) 55%, oklch(87.87% 0.0426 272.28)) 10%, transparent)",
"bg.error": "color-mix(in oklab, oklch(75.56% 0.1297 2.76) 14%, oklch(21.55% 0.0254 284.06))",
"bg.success": "color-mix(in oklab, oklch(85.77% 0.1092 142.72) 14%, oklch(21.55% 0.0254 284.06))",
"bg.warning": "color-mix(in oklab, oklch(82.37% 0.1015 52.63) 14%, oklch(21.55% 0.0254 284.06))",
diff --git a/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts b/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts
index 41aa57a830..58aa939d9f 100644
--- a/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts
+++ b/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts
@@ -176,7 +176,7 @@ export const tabsSlotRecipe = defineSlotRecipe({
trigger: {
...chakraSlotRecipes.tabs.variants?.variant?.enclosed?.trigger,
_hover: {
- '&:not([data-selected])': { bg: 'bg.emphasized' },
+ '&:not([data-selected])': { bg: 'bg.hover' },
},
},
},
@@ -474,8 +474,8 @@ export const dropdownItem = {
_highlighted: { bg: 'bg.error' },
_hover: { bg: 'bg.error' },
},
- _highlighted: { bg: 'bg.emphasized' },
- _hover: { bg: 'bg.emphasized' },
+ _highlighted: { bg: 'bg.hover' },
+ _hover: { bg: 'bg.hover' },
_focusVisible: {
outline: '2px solid',
outlineColor: 'accent.solid',
diff --git a/invokeai/frontend/webv2/src/platform/ui/theme/system.ts b/invokeai/frontend/webv2/src/platform/ui/theme/system.ts
index ad090f75db..3f7d67fc6b 100644
--- a/invokeai/frontend/webv2/src/platform/ui/theme/system.ts
+++ b/invokeai/frontend/webv2/src/platform/ui/theme/system.ts
@@ -105,7 +105,7 @@ const brandFg: Compute = (theme) =>
const accentSolid: Compute = (theme) => theme.colors.accent.solid;
/** Foreground pulled toward accent: the hue of interaction fills, which apply it at low alpha. */
const hoverTint: Compute = (theme) =>
- `color-mix(in oklab, ${theme.colors.accent.solid} 40%, ${
+ `color-mix(in oklab, ${theme.colors.accent.solid} 55%, ${
theme.colorScheme === 'light' ? theme.colors.neutral[950] : theme.colors.neutral[50]
})`;
@@ -159,8 +159,12 @@ const semanticColors = {
'bg.panel': stepRef(800, 100),
'bg.emphasized': colorToken((theme) => theme.colors.control),
'bg.inset': colorToken((theme) => theme.colors.inset),
- /** The pointed fill for rows and tabs: a faint accent-tinted foreground, translucent so it reads on any surface. */
- 'bg.hover': mix(hoverTint, 8, () => 'transparent'),
+ /**
+ * The pointed or highlighted fill for rows, tabs, and options: a faint accent-tinted foreground, translucent so it
+ * reads on any surface. Matches the ghost/outline button hover (`gray.hoverTint/10`), so an open trigger and its
+ * highlighted option share one fill.
+ */
+ 'bg.hover': mix(hoverTint, 10, () => 'transparent'),
// Soft status fills for alerts/banners, mixed into the panel surface.
'bg.error': mix(danger, 14, surface),
'bg.success': mix(success, 14, surface),
diff --git a/invokeai/frontend/webv2/src/workbench/palette/CommandPaletteRows.tsx b/invokeai/frontend/webv2/src/workbench/palette/CommandPaletteRows.tsx
index 053923f9cb..f454c581b2 100644
--- a/invokeai/frontend/webv2/src/workbench/palette/CommandPaletteRows.tsx
+++ b/invokeai/frontend/webv2/src/workbench/palette/CommandPaletteRows.tsx
@@ -78,7 +78,7 @@ const EntryRow = ({
{...rowButtonProps}
id={domId}
aria-selected={isActive}
- bg={isActive ? 'bg.emphasized' : undefined}
+ bg={isActive ? 'bg.hover' : undefined}
role="option"
onClick={onRun}
onMouseDown={preventFocusSteal}
@@ -158,7 +158,7 @@ const ScopeRow = ({
{...rowButtonProps}
id={domId}
aria-selected={isActive}
- bg={isActive ? 'bg.emphasized' : undefined}
+ bg={isActive ? 'bg.hover' : undefined}
role="option"
onClick={onRun}
onMouseDown={preventFocusSteal}
diff --git a/invokeai/frontend/webv2/src/workbench/shell/StatusBar.tsx b/invokeai/frontend/webv2/src/workbench/shell/StatusBar.tsx
index e9bb5a423f..ac49fcd0de 100644
--- a/invokeai/frontend/webv2/src/workbench/shell/StatusBar.tsx
+++ b/invokeai/frontend/webv2/src/workbench/shell/StatusBar.tsx
@@ -48,7 +48,7 @@ const BOTTOM_MENU_POSITIONING = { placement: 'top-end' } as const;
const WIDGET_POPOVER_POSITIONING = { placement: 'top-end' } as const;
const BOTTOM_MENU_TRIGGER = { kind: 'bottom' } as const;
/** Use content color for active brand accents; background tint is indistinguishable on the light theme. */
-const COMPACT_ROW_HOVER_PROPS = { bg: 'bg.emphasized', color: 'fg' };
+const COMPACT_ROW_HOVER_PROPS = { bg: 'bg.hover', color: 'fg' };
/** Size drop overlays per cluster so one strip-wide curtain cannot cover the other target. */
const ClusterDropRing = ({ dropState, isOver }: { dropState: WidgetRegionDropState; isOver: boolean }) => (
diff --git a/invokeai/frontend/webv2/src/workbench/shell/topbar/LayoutPresetStrip.tsx b/invokeai/frontend/webv2/src/workbench/shell/topbar/LayoutPresetStrip.tsx
index 883b74e0a2..86ccad0ef2 100644
--- a/invokeai/frontend/webv2/src/workbench/shell/topbar/LayoutPresetStrip.tsx
+++ b/invokeai/frontend/webv2/src/workbench/shell/topbar/LayoutPresetStrip.tsx
@@ -400,10 +400,10 @@ const PresetTab = ({
);
};
-const MENU_AFFORDANCE_HOVER_PROPS = { bg: 'bg.emphasized', color: 'fg' } as const;
+const MENU_AFFORDANCE_HOVER_PROPS = { bg: 'bg.hover', color: 'fg' } as const;
-// Same fills as the widget rail's hover and active items (`WIDGET_ITEM_SX`).
-const PRESET_TAB_HOVER_PROPS = { bg: 'bg.emphasized', color: 'fg' } as const;
+// A pointed inactive preset takes the shared tinted hover; the active one keeps the widget rail's active fill.
+const PRESET_TAB_HOVER_PROPS = { '&:not([data-selected])': { bg: 'bg.hover', color: 'fg' } } as const;
const PRESET_TAB_SELECTED_PROPS = { bg: 'bg.emphasized', color: 'fg' } as const;
const DriftDot = () => <Box aria-hidden="true" bg="accent.solid" boxSize="1.5" flexShrink={0} rounded="full" />;
diff --git a/invokeai/frontend/webv2/src/workbench/widget-frame/WidgetBar.tsx b/invokeai/frontend/webv2/src/workbench/widget-frame/WidgetBar.tsx
index de2c5d2bb3..35c9eb8eba 100644
--- a/invokeai/frontend/webv2/src/workbench/widget-frame/WidgetBar.tsx
+++ b/invokeai/frontend/webv2/src/workbench/widget-frame/WidgetBar.tsx
@@ -230,7 +230,7 @@ export const WIDGET_ITEM_SX: SystemStyleObject = {
w: 9,
color: 'fg.muted',
'&[aria-pressed="false"]:hover, &[data-floating]:hover': {
- bg: 'bg.emphasized',
+ bg: 'bg.hover',
color: 'fg',
},
'&[aria-pressed="true"]': {