This PR may land shortly...
What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
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?