This PR may land shortly...
Allow admins to set brand color #10097
What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
Description
This feature allows admins to set their own main brand color....
This color needs to contrast properly with white, so I added the wcag contrast gem. I think this is a good gem to add, because we can start using this elsewhere, like user profile colors, tags, etc. Currently we let users set non-contrasting colors and basically just moderate it. This will help us ensure a minimum of 4.5:1 contrast for readability and accessibility for all.
The gem has not recently been updates, but it is a fairly simple low-bloat utility gem. The gem author is active and I feel like we can be comfortable that we could merge a change if we needed to.
Also added some basic validations in the controller. I figured we can start adding some validations in this area and extract these to a better place in a future refactor once we establish more of these.
Allowing admins to declare their primary color which is then used everywhere we currently use the blue-purple color on buttons etc.
As we define areas of customization we want to ensure we give people enough features while also not letting people make too many mistakes or ruin the UX of users by introducing too much radical variation....
But I'm wondering of other standard ways we can allow certian additional variation along these lines.... Could forems define a color other than white for their header bar? Or a different footer color or other accent?
Could forems default to a dark theme or have broader control over any of this?
Top comments (4)
Forem visual customization allows users to personalize the appearance of their community platform, including colors, logos, and layout. This feature enables communities to create a unique and branded experience that reflects their identity and values. For a different kind of customization and personalization, exploring Casumo Casino bonuses can enhance the gaming experience with additional rewards and incentives tailored to individual preferences.
I wonder if this ought be tied into a theme creator?
Ruby themes file #2154
Is it worth having a ruby file that contains the theme's HTML, though we'd only have night mode in there for now?
I'm not that clued up on ruby on rails but I presume we can have a file that contains several thems but will only return the relevant HTML based on some request?
CC: @rhymes @lightalloy
It'd be nice for forem maintainers to be able to define their own themes.
LOL I think we found a bug, I got a notification because my name is mentioned in the PR :D
Ooo I have gone all grey on mine π