fix: Login services button colors (#32570)
parent
72b8b5e0f6
commit
15664127be
@ -0,0 +1,8 @@ |
||||
--- |
||||
'@rocket.chat/web-ui-registration': patch |
||||
"@rocket.chat/meteor": minor |
||||
--- |
||||
|
||||
Login services button was not respecting the button color and text color settings. Implemented a fix to respect these settings and change the button colors accordingly. |
||||
|
||||
Added a warning on all settings which allow admins to change OAuth button colors, so that they can be alerted about WCAG (Web Content Accessibility Guidelines) compliance. |
||||
@ -0,0 +1,9 @@ |
||||
export const convertHexToRGB = (hex: string) => { |
||||
hex = hex.replace(/^#/, ''); |
||||
|
||||
const red = parseInt(hex.substring(0, 2), 16); |
||||
const green = parseInt(hex.substring(2, 4), 16); |
||||
const blue = parseInt(hex.substring(4, 6), 16); |
||||
|
||||
return `rgb(${red}, ${green}, ${blue})`; |
||||
}; |
||||
Loading…
Reference in new issue