Skip to content

hex colors must include ##1538

Merged
ChaelCodes merged 2 commits intorubyevents:mainfrom
matthewmayer:fix-hex-colors
Mar 17, 2026
Merged

hex colors must include ##1538
ChaelCodes merged 2 commits intorubyevents:mainfrom
matthewmayer:fix-hex-colors

Conversation

@matthewmayer
Copy link
Copy Markdown
Contributor

fixes #1537

@ChaelCodes
Copy link
Copy Markdown
Collaborator

I can't tell you why - but this appears to be intentional.

if content.match?(/^featured_color:/)
content.gsub!(/^featured_color:.*$/, "featured_color: \"#{text_color.delete("#")}\"")
else
content = content.rstrip + "\nfeatured_color: \"#{text_color.delete("#")}\"\n"

Either that or there's a data issue happening in the generator that needs to be resolved.

@marcoroth
Copy link
Copy Markdown
Member

I think the rake task is actually wrong

@ChaelCodes
Copy link
Copy Markdown
Collaborator

If that's the case, we should fix the generate event assets rake task to remove deleting the #.

if content.match?(/^featured_color:/)
content.gsub!(/^featured_color:.*$/, "featured_color: \"#{text_color.delete("#")}\"")
else
content = content.rstrip + "\nfeatured_color: \"#{text_color.delete("#")}\"\n"

Copy link
Copy Markdown
Collaborator

@ChaelCodes ChaelCodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching and fixing this @matthewmayer ! Appreciate you finding all the edge cases.

@ChaelCodes ChaelCodes merged commit 3f3402b into rubyevents:main Mar 17, 2026
5 checks passed
@ChaelCodes
Copy link
Copy Markdown
Collaborator

We can capture this with a pattern too - https://github.com/danielfriis/ruby_llm-schema?tab=readme-ov-file#strings

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.

invalid hex colors cause contrast problems for some event previews

3 participants