Skip to content

feat(client): add support for 8-bit hex color codes in CSS#4960

Merged
Alexays merged 5 commits intoAlexays:masterfrom
keepo-dot:feature/8bit-hex-support
Mar 31, 2026
Merged

feat(client): add support for 8-bit hex color codes in CSS#4960
Alexays merged 5 commits intoAlexays:masterfrom
keepo-dot:feature/8bit-hex-support

Conversation

@keepo-dot
Copy link
Copy Markdown
Contributor

This allows users to use #RRGGBBAA format in their style.css. The client now detects 8-bit hex codes, transforms them into GTK-compatible rgba() syntax, and loads the modified data into the CSS provider.

  • Added utility to detect 8-bit hex patterns.
  • Added transformation logic to convert hex alpha to decimal.
  • Intercepted CSS loading in Client::setupCss to handle the conversion.

I have tested compilation and building. As well as testing 8 bit hex values in styles.css to verify functionality.

This allows users to use #RRGGBBAA format in their style.css.
The client now detects 8-bit hex codes, transforms them into
GTK-compatible rgba() syntax, and loads the modified data
into the CSS provider.

- Added utility to detect 8-bit hex patterns.
- Added transformation logic to convert hex alpha to decimal.
- Intercepted CSS loading in Client::setupCss to handle the conversion.
@keepo-dot keepo-dot force-pushed the feature/8bit-hex-support branch from 5e310a8 to 3533265 Compare March 29, 2026 03:04
@Alexays Alexays merged commit 1e965cc into Alexays:master Mar 31, 2026
9 checks passed
@Alexays
Copy link
Copy Markdown
Owner

Alexays commented Mar 31, 2026

Thanks!

@keepo-dot
Copy link
Copy Markdown
Contributor Author

If I want to add onto this (error handling & such, though I don't think I need it since if the file doesn't exist waybar handles it), should I continue off of this PR or create a new one?

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.

2 participants