Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix(core): add darkYellow color (#5782)
Roman Sergeevc14cd957d2d0
diff --git a/packages/core/src/shared/color/color-kit.ts b/packages/core/src/shared/color/color-kit.tsindex 24d72fe85a..74c514c45c 100644--- a/packages/core/src/shared/color/color-kit.ts+++ b/packages/core/src/shared/color/color-kit.ts@@ -83,6 +83,7 @@ export const COLORS: { [key: string]: number[] } = {darkSlateGrey: [47, 79, 79],darkTurquoise: [0, 206, 209],darkViolet: [148, 0, 211],+ darkYellow: [139, 128, 0],deepPink: [255, 20, 147],deepSkyBlue: [0, 191, 255],dimGray: [105, 105, 105],diff --git a/packages/core/src/shared/common.ts b/packages/core/src/shared/common.tsindex 5c0b6cb3c7..dcdf85db76 100644--- a/packages/core/src/shared/common.ts+++ b/packages/core/src/shared/common.ts@@ -30,6 +30,7 @@ import {WrapStrategy,} from '../types/enum';import { ColorBuilder } from './color/color';+import { ColorKit } from './color/color-kit';import { ObjectMatrix } from './object-matrix';import { Tools } from './tools';@@ -146,7 +147,7 @@ export function isCellCoverable(cell: Nullable<ICellDataForSheetInterceptor>) {export function getColorStyle(color: Nullable<IColorStyle>): Nullable<string> {if (color) {if (color.rgb) {- return color.rgb;+ return new ColorKit(color.rgb).toHexString();}if (color.th) {diff --git a/packages/sheets-formula/package.json b/packages/sheets-formula/package.jsonindex 85edeba887..fa8be9cdd2 100644--- a/packages/sheets-formula/package.json+++ b/packages/sheets-formula/package.json@@ -79,13 +79,13 @@"dependencies": {"@univerjs/core": "workspace:*","@univerjs/engine-formula": "workspace:*",- "@univerjs/engine-render": "workspace:*","@univerjs/rpc": "workspace:*","@univerjs/sheets": "workspace:*"},"devDependencies": {"@univerjs-infra/shared": "workspace:*","@univerjs/docs": "workspace:*",+ "@univerjs/engine-render": "workspace:*","rxjs": "^7.8.2","typescript": "^5.9.2","vite": "^7.1.3",diff --git a/packages/sheets-ui/src/services/clipboard/__tests__/clipboard-copy-with-default-style.spec.ts b/packages/sheets-ui/src/services/clipboard/__tests__/clipboard-copy-with-default-style.spec.tsindex 81da416352..415d7399fe 100644--- a/packages/sheets-ui/src/services/clipboard/__tests__/clipboard-copy-with-default-style.spec.ts+++ b/packages/sheets-ui/src/services/clipboard/__tests__/clipboard-copy-with-default-style.spec.ts@@ -150,7 +150,7 @@ describe('Test clipboard', () => {const { html, copyId } = sheetClipboardService.generateCopyContent('test', 'sheet1', selection.range)!;const result = `<google data-copy-id="${copyId}"-sheets-html-origin><table xmlns="http://www.w3.org/1999/xhtml" cellspacing="0" cellpadding="0" dir="ltr" style="table-layout:fixed;font-size:10pt;font-family:Arial;width:0px;border-collapse:collapse;border:none"><colgroup><col width="88" /></colgroup>-<tbody><tr style="height: 24px;"><td style="font-size: 20pt; color: red; border-bottom: 0.5pt solid #000; border-top: 0.5pt solid #000; border-right: 0.5pt solid #000; border-left: 0.5pt solid #000; ">1</td></tr><tr style="height: 24px;"><td style="font-size: 20pt; color: red; border-bottom: 0.5pt solid #000; border-top: 0.5pt solid #000; border-right: 0.5pt solid #000; border-left: 0.5pt solid #000; ">2</td></tr><tr style="height: 24px;"><td style="font-size: 20pt; color: red; border-bottom: 0.5pt solid #000; border-top: 0.5pt solid #000; border-right: 0.5pt solid #000; border-left: 0.5pt solid #000; ">3</td></tr><tr style="height: 24px;"><td style="font-size: 20pt; color: red; border-bottom: 0.5pt solid #000; border-top: 0.5pt solid #000; border-right: 0.5pt solid #000; border-left: 0.5pt solid #000; ">4</td></tr></tbody></table>`;+<tbody><tr style="height: 24px;"><td style="font-size: 20pt; color: #ff0000; border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; ">1</td></tr><tr style="height: 24px;"><td style="font-size: 20pt; color: #ff0000; border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; ">2</td></tr><tr style="height: 24px;"><td style="font-size: 20pt; color: #ff0000; border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; ">3</td></tr><tr style="height: 24px;"><td style="font-size: 20pt; color: #ff0000; border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; ">4</td></tr></tbody></table>`;expect(html).toBe(result);});});diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 23ebdb5395..305f6ea3ad 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -2421,9 +2421,6 @@ importers:'@univerjs/engine-formula':specifier: workspace:*version: link:../engine-formula- '@univerjs/engine-render':- specifier: workspace:*- version: link:../engine-render'@univerjs/rpc':specifier: workspace:*version: link:../rpc@@ -2437,6 +2434,9 @@ importers:'@univerjs/docs':specifier: workspace:*version: link:../docs+ '@univerjs/engine-render':+ specifier: workspace:*+ version: link:../engine-renderrxjs:specifier: ^7.8.2version: 7.8.2