pk 5978a33283 color: accept #rgb/#rgba and #rrggbbaa in contrastTextColor; stop rgbToHex throwing
contrastTextColor matched only #rrggbb and silently returned the dark
fallback for every other form — #000 and #369 produced a black label on a
near-black fill. colorLuminance in the same file already expanded short
hex, so this was an inconsistency, not a contract.

rgbToHex threw a TypeError on non-matching input (matches.length on null)
and rejected rgba() and whitespace-free rgb strings; it now returns  and
ignores the alpha channel.
2026-11-15 18:36:49 +01:00
2022-03-12 22:13:15 +01:00
2022-03-12 22:13:15 +01:00
2022-04-18 23:08:45 +02:00
2022-03-11 23:42:26 +01:00
2023-07-27 16:40:07 +02:00
2022-03-18 12:54:58 +01:00
2022-03-11 23:42:26 +01:00
2022-10-29 22:05:19 +02:00
2022-03-11 23:42:26 +01:00
2022-03-11 23:42:26 +01:00
2022-03-11 23:42:26 +01:00
2022-04-22 13:00:12 +02:00
2022-03-11 23:38:42 +01:00
2024-07-30 11:37:11 +02:00
2022-03-11 23:38:42 +01:00
2024-07-30 11:27:32 +02:00
2026-01-16 14:17:19 +01:00
2025-01-26 13:43:30 +01:00
2025-03-25 12:51:19 +01:00
S
Description
No description provided
Readme Apache-2.0
81 KiB
0 Stars 1 Watchers 0 Forks
Languages
JavaScript 100%