style_flextable_civilytics() defaults to Bootstrap colors, not Civilytics brand #21

Open
opened 2026-08-23 23:38:45 -04:00 by jared · 0 comments
Owner

style_flextable_civilytics() hardcodes defaults that are not Civilytics
brand colors. From R/flextable.R:53-65:

argument current default what it should be
header_bg #2c3e50 (Bootstrap/Flatly navy) Civilytics navy, #1A2E4A (navy_700)
zebra_bg #f0f0eb paper_2, #F2EDE4
outer_border_color #888888 a rule_strong-derived value
inner_border_color #cccccc a rule-derived value
footer_color #555555 an ink_3/ink_4-derived value

A branding package ships another vendor's palette as its table default. Every
branded table produced with the defaults is off-brand.

Fix: source all five from civilytics_colors rather than hex literals. The
roborev guidelines already forbid new hex literals in table code; this is the
existing debt they carve out.

Note: this changes rendered output for anyone relying on the defaults, so it
needs a NEWS.md entry under Bug fixes and a version bump.

`style_flextable_civilytics()` hardcodes defaults that are not Civilytics brand colors. From `R/flextable.R:53-65`: | argument | current default | what it should be | |---|---|---| | `header_bg` | `#2c3e50` (Bootstrap/Flatly navy) | Civilytics navy, `#1A2E4A` (`navy_700`) | | `zebra_bg` | `#f0f0eb` | `paper_2`, `#F2EDE4` | | `outer_border_color` | `#888888` | a `rule_strong`-derived value | | `inner_border_color` | `#cccccc` | a `rule`-derived value | | `footer_color` | `#555555` | an `ink_3`/`ink_4`-derived value | A branding package ships another vendor's palette as its table default. Every branded table produced with the defaults is off-brand. **Fix:** source all five from `civilytics_colors` rather than hex literals. The roborev guidelines already forbid new hex literals in table code; this is the existing debt they carve out. **Note:** this changes rendered output for anyone relying on the defaults, so it needs a `NEWS.md` entry under **Bug fixes** and a version bump.
jared added the
type
debt
ws
logo
labels 2026-08-23 23:38:45 -04:00
Sign in to join this conversation.
No labels
type
debt
ws
logo
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Civilytics/civilyticsR#21