diff --git a/src/spaces/oklab.js b/src/spaces/oklab.js index efb897661..fa99122eb 100644 --- a/src/spaces/oklab.js +++ b/src/spaces/oklab.js @@ -12,17 +12,19 @@ Color.defineSpace({ inGamut: coords => true, // Note that XYZ is relative to D65 white: Color.whites.D65, + // Recalculated for consistent reference white + // see https://github.com/w3c/csswg-drafts/issues/6642#issuecomment-943521484 XYZtoLMS_M: [ - [ 0.8189330101, 0.3618667424, -0.1288597137 ], - [ 0.0329845436, 0.9293118715, 0.0361456387 ], - [ 0.0482003018, 0.2643662691, 0.6338517070 ] - ], + [ 0.8190224432164319, 0.3619062562801221, -0.12887378261216414 ], + [ 0.0329836671980271, 0.9292868468965546, 0.03614466816999844 ], + [ 0.048177199566046255, 0.26423952494422764, 0.6335478258136937 ] + ], // inverse of XYZtoLMS_M LMStoXYZ_M: [ - [ 1.227013851103521026, -0.5577999806518222383, 0.28125614896646780758 ], - [ -0.040580178423280593977, 1.1122568696168301049, -0.071676678665601200577 ], - [ -0.076381284505706892869, -0.42148197841801273055, 1.5861632204407947575 ] - ], + [ 1.2268798733741557, -0.5578149965554813, 0.28139105017721583], + [ -0.04057576262431372, 1.1122868293970594, -0.07171106666151701], + [ -0.07637294974672142, -0.4214933239627914, 1.5869240244272418 ] +], LMStoLab_M: [ [ 0.2104542553, 0.7936177850, -0.0040720468 ], [ 1.9779984951, -2.4285922050, 0.4505937099 ],