From 2cd63db41fb772fa61601ab7db2e7e174f6aad05 Mon Sep 17 00:00:00 2001 From: Tycho Tatitscheff Date: Tue, 12 Dec 2023 14:36:18 +0100 Subject: [PATCH] feat: update LMs constants See: - color-js/color.js#356 - https://github.com/LeaVerou/color.js/pull/352/files#r1398416103 - color-js/color.js#357 (comment) --- src/constants.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 3ec2964..7ee76ea 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,25 +1,25 @@ export const LMS_Oklab = [ - [0.2104542553, 0.793617785, -0.0040720468], - [1.9779984951, -2.428592205, 0.4505937099], - [0.0259040371, 0.7827717662, -0.808675766], + [0.210454268309314, 0.7936177747023054, -0.0040720430116193], + [1.9779985324311684, -2.4285922420485799, 0.450593709617411], + [0.0259040424655478, 0.7827717124575296, -0.8086757549230774], ]; export const OkLab_LMSg = [ - [0.99999999845051981432, 0.39633779217376785678, 0.21580375806075880339], - [1.0000000088817607767, -0.1055613423236563494, -0.063854174771705903402], - [1.0000000546724109177, -0.089484182094965759684, -1.2914855378640917399], + [1.0, 0.3963377773761749, 0.2158037573099136], + [1.0, -0.1055613458156586, -0.0638541728258133], + [1.0, -0.0894841775298119, -1.2914855480194092], ]; export const XYZ_LMS = [ - [0.8190224432164319, 0.3619062562801221, -0.12887378261216414], - [0.0329836671980271, 0.9292868468965546, 0.03614466816999844], - [0.048177199566046255, 0.26423952494422764, 0.6335478258136937], + [0.819022437996703, 0.3619062600528904, -0.1288737815209879], + [0.0329836539323885, 0.9292868615863434, 0.0361446663506424], + [0.0481771893596242, 0.2642395317527308, 0.6335478284694309], ]; export const LMS_XYZ = [ - [1.2268798733741557, -0.5578149965554813, 0.28139105017721583], - [-0.04057576262431372, 1.1122868293970594, -0.07171106666151701], - [-0.07637294974672142, -0.4214933239627914, 1.5869240244272418], + [1.2268798758459243, -0.5578149944602171, 0.2813910456659647], + [-0.0405757452148008, 1.112286803280317, -0.0717110580655164], + [-0.0763729366746601, -0.4214933324022432, 1.5869240198367816], ]; export const XYZ_to_RGB = [