Skip to content

Fix GEMPAK color 8 to match coltbl.xwp - #4227

Open
1915rising wants to merge 1 commit into
Unidata:mainfrom
1915rising:fix/4226-gempak-color-8
Open

1915rising wants to merge 1 commit into
Unidata:mainfrom
1915rising:fix/4226-gempak-color-8

Conversation

@1915rising

Copy link
Copy Markdown

Fixes #4226.

convert_gempak_color(8) returned #CD6839 (RGB 205, 104, 57), the X11 sienna3 value. GEMPAK's own $GEMTBL/colors/coltbl.xwp defines color 8 (BROWN) as RGB (139, 71, 38), which is #8B4726, so color 8 rendered noticeably lighter/redder than in GEMPAK.

Reproduction (from the issue):

from metpy.plots import convert_gempak_color
convert_gempak_color(8, 'xw')  # was: #CD6839 -> (205, 104, 57); now: #8B4726 -> (139, 71, 38)

Fix: change the single table entry for color 8 in metpy.plots._util to #8B4726. The two mpl_image_compare baselines for the GEMPAK color tests are regenerated, since they embed the old color; all other colors are unchanged.

Tests: new regression test test_gempak_color_brown asserts color 8 in both styles. pytest tests/plots/test_util.py -k gempak --mpl: 5 passed before, 6 passed after. Full test_util.py --mpl run: the 4 test_add_timestamp* image failures are identical before and after this change (pre-existing in my environment).

@1915rising
1915rising requested a review from a team as a code owner November 24, 2026 23:17
@1915rising
1915rising requested review from dopplershift and removed request for a team November 24, 2026 23:17
@CLAassistant

CLAassistant commented Nov 24, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

This branch has not been deployed

No deployments
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.

Color 8 is incorrect in convert_gempak_color

2 participants