Ideas

Allow customizable colors for QR codes

Allow customizable colors for QR codes

17.0 Core Complete

Proposal to Enhance QRCode Endpoint in Rock RMS

Overview

This is a proposal for enhancing GetQRCode.ashx so that it can allow for customizing background and foreground colors with RGBA hex values. Currently, GetQRCode.ashx only supports black and white as defaults. This proposal was done with the intention of allowing transparent background. The library QRCoder that Rock uses for its QR code generation supports hex values for both foreground and background, so that was an easy adjustment.


Proposed Changes

The proposed changes would allow users to specify both the foreground and background colors using any hex value, including RGBA. This flexibility will help churches create QR codes that seamlessly integrate into their marketing materials, websites, and event signage.


Desired Features

  • Foreground Color: Allow users to set the QR code's foreground color using a hex value (e.g., `#FF5733`).
  • Background Color: Allow users to set the QR code's background color using a hex value (e.g., `#FFFFFF`).
  • Transparency Support: Option to set background color with transparency using RGBA values.

These would be included as query parameters to the URL endpoint.


API Changes

To implement these features, the following changes are suggested for the QRCode endpoint:


1. Add Parameters

   - foregroundColor: String (hex/RGBA)

   - backgroundColor: String (hex/RGBA)

Both of these parameters would be optional. They would simply default to black and white as normal if left blank/missing.

carbon.png

2. Example Request:

    GetQRCode.ashx?data=https://example.com&foregroundColor=%23FF5733&backgroundColor=%23FFFFFF

This can obviously be implemented in various ways. In my testing I just passed the hex values in without the hash, and appended it before creating the images.


Screenshots

Screenshot_2024-08-07_at_2.52.56 PM.pngScreenshot_2024-08-07_at_2.53.16 PM.pngScreenshot_2024-08-07_at_2.53.33 PM.png

Here are three examples that use the changes:

  1. Transparent background
  2. Customized background color
  3. Customized foreground and background colors (Disclaimer: This color combination struggles to be picked up by phone)


Photo of Noah LopezSubmitted by Noah Lopez, Bayside Covenant Church  ·   ·  Core
Photo of Nick AirdoComplete Nick Airdo, Spark!  · 

This will be in Rock v17 (as of 1.17.0.27)

Planned Version 17.0
Ministry Strength 1 / 5
Login to add a comment...

Submission Success Tips

Cultivate your ideas for maximum impact with these helpful submission tips that will increase the chances of your brilliant concepts becoming reality.

  • Clear Title: Craft a straightforward and descriptive title that instantly conveys the essence of your idea.
  • Concise Description: Provide an idea description that is succinct, ensuring it effectively communicates the concept without unnecessary verbosity.
  • Provide Additional Details: With a concise description complete, now provide any other details that are needed to better understand the requirements.
  • Thorough Ministry Need Review: Provide a comprehensive overview of the ministry need your idea addresses, emphasizing its significance.
  • Cover the WHY: Clearly articulate the rationale behind your idea, explaining why it's essential and how it aligns with the organization's goals and mission. Oftentimes a clear "why" sheds light into other possible options.