Bug 170023 - Hard-coded format colors for numbers should not be defined
Summary: Hard-coded format colors for numbers should not be defined
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.0.4.2 release
Hardware: x86-64 (AMD64) All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: QA:needsComment
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-17 16:07 UTC by Bubble
Modified: 2026-01-01 03:13 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bubble 2025-12-17 16:07:26 UTC
Description:
When running Calc and selecting cells to "Format Cells", "Numbers", "Format code" the string is hard coded for 8 colors but could allow more colors with: 

[ RGB(0, 100, 0) ]  /* for DARK GREEN Hex equivalent: #006400 */

e.g.
original hard coded string:
[RED]+[$$-409]0.00;[GREEN]-[$$-409]0.00

New simplified flexible sting with user modification in mind:

[RGB(139, 0, 0)]+[$$-409]0.00;[RGB(0, 100, 0)]-[$$-409]0.00

OR

[COLOR=#5A0000]+[$$-409]0.00;[COLOR=#005000]-[$$-409]0.00

Not sure if it is a version issue.

Steps to Reproduce:
1. Run Calc 
2. Select cells and right click to "Format Cells", "Numbers", "Format code" 
3. Modify string under "Format code" to show negative numbers in dark green on white background.
4. Hard coded colors deny access to other colors 

Actual Results:
[RED]+[$$-409]0.00;[GREEN]-[$$-409]0.00

Expected Results:
[RGB(139, 0, 0)]+[$$-409]0.00;[RGB(0, 100, 0)]-[$$-409]0.00

OR

[COLOR=#5A0000]+[$$-409]0.00;[COLOR=#005000]-[$$-409]0.00


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.0.4.2
Build ID: 00(Build:2)
CPU threads: 24; OS: Linux 5.10; UI render: GL; VCL: kf5
Locale: en-US (en_US.UTF-8); UI: en-US
Debian package version: 1:7.0.4-4+deb11u13
Calc: threaded