Skip to content

[IMP] sheet: add background color to sheet#8646

Open
hokolomopo wants to merge 1 commit into
masterfrom
master-sheet-background-adrm
Open

[IMP] sheet: add background color to sheet#8646
hokolomopo wants to merge 1 commit into
masterfrom
master-sheet-background-adrm

Conversation

@hokolomopo
Copy link
Copy Markdown
Contributor

@hokolomopo hokolomopo commented May 12, 2026

Description

This commit adds the possibility to set the background color of a sheet.

There was also a few issue with the sheet tab color, the color was not added to the custom colors and the color picker didn't have a color selected.

Task: 6209932

review checklist

  • feature is organized in plugin, or UI components
  • support of duplicate sheet (deep copy)
  • in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • in model/UI: ranges are strings (to show the user)
  • undo-able commands (uses this.history.update)
  • multiuser-able commands (has inverse commands and transformations where needed)
  • new/updated/removed commands are documented
  • exportable in excel
  • translations (_t("qmsdf %s", abc))
  • unit tested
  • clean commented code
  • track breaking changes
  • doc is rebuild (npm run doc)
  • status is correct in Odoo

@robodoo
Copy link
Copy Markdown
Collaborator

robodoo commented May 12, 2026

Pull request status dashboard

Comment thread src/stores/grid_renderer_store.ts Outdated
Comment on lines +218 to +222
const baseGridColor = "#CECFCF";
const background = this.getBackgroundColor(renderingContext);
const blendedGridColor = blendColors(baseGridColor + "aa", background + "50");
ctx.strokeStyle = setColorAlpha(blendedGridColor, 1);
ctx.lineWidth = thinLineWidth;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bend the color a bit with the background so it's less shocking of non-white background color. Color was picked so it stays the same on a white background.

Still not great on colored background tho. Probably should tweak it a bit, and have a different color on high-contrast background.

But for obvious reasons, I'm not great with colors 😔

@anhe-odoo
Copy link
Copy Markdown
Contributor

@hokolomopo : need a rebase (probably because of the dark mode, as the grid doesn't seem to work for the dark mode ...)

@hokolomopo hokolomopo force-pushed the master-sheet-background-adrm branch from 601b2ae to 14ba35d Compare May 13, 2026 09:55
This commit adds the possibility to set the background color of a sheet.

There was also a few issue with the sheet tab color, the color was
not added to the custom colors and the color picker didn't have a color
selected.

Task: 6209932
@hokolomopo hokolomopo force-pushed the master-sheet-background-adrm branch from 14ba35d to 16622e1 Compare May 13, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants