From 7ef975e9753cd8270d0c829f0a9cbe7653721941 Mon Sep 17 00:00:00 2001 From: Dustin Healy <54083382+dustinhealy@users.noreply.github.com> Date: Thu, 18 Dec 2025 17:44:40 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=82=20feat:=20High=20Contrast=20Toasts?= =?UTF-8?q?=20(#11035)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/client/src/components/Toast.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/client/src/components/Toast.tsx b/packages/client/src/components/Toast.tsx index 993d74bc5d..f78b6d5aaa 100644 --- a/packages/client/src/components/Toast.tsx +++ b/packages/client/src/components/Toast.tsx @@ -5,10 +5,16 @@ import { useToast } from '~/hooks'; export function Toast() { const { toast, onOpenChange } = useToast(); const severityClassName = { + /* Going up by 100 units in terms of darkness (eg bg-green-500 to bg-green-600) for + * bg colors produces colors that are too visually dissimilar to LibreChat's standard color palette. + * These colors were derived by adjusting the values in the HSV color space using CCA + * until the 4.5:1 contrast ratio threshold was met against white text while maintaining + * a relatively recognizable color scheme for toasts without compromising accessibility. + * */ [NotificationSeverity.INFO]: 'border-gray-500 bg-gray-500', - [NotificationSeverity.SUCCESS]: 'border-green-500 bg-green-500', - [NotificationSeverity.WARNING]: 'border-orange-600 bg-orange-600', - [NotificationSeverity.ERROR]: 'border-red-500 bg-red-500', + [NotificationSeverity.SUCCESS]: 'border-[#02855E] bg-[#02855E]', + [NotificationSeverity.WARNING]: 'border-[#C75209] bg-[#C75209]', + [NotificationSeverity.ERROR]: 'border-[#E02F1F] bg-[#E02F1F]', }; return (