From 51e35ceead7dde2f530cdae6ce8a84c4227309b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sat, 24 Aug 2024 15:06:41 +0200 Subject: [PATCH] Fix color to hexstring conversion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- NextcloudTalk/NCUtils.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NextcloudTalk/NCUtils.swift b/NextcloudTalk/NCUtils.swift index fb257e48a..fca912d4b 100644 --- a/NextcloudTalk/NCUtils.swift +++ b/NextcloudTalk/NCUtils.swift @@ -430,9 +430,9 @@ import AVFoundation // We don't expect an alpha component right now return String( format: "#%02lX%02lX%02lX", - Int(red * multiplier), - Int(green * multiplier), - Int(blue * multiplier) + min(Int(red * multiplier), 255), + min(Int(green * multiplier), 255), + min(Int(blue * multiplier), 255) ) }