Skip to content

Commit 46f2aa2

Browse files
committed
minor correction of code comments
1 parent 2988d2b commit 46f2aa2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

css-color-4/conversions.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,11 @@ function gam_a98rgb(RGB) {
167167
}
168168

169169
function lin_a98rgb_to_XYZ(rgb) {
170-
// convert an array of linear-light ProPhotoRGB values to CIE XYZ
170+
// convert an array of linear-light a98rgb values to CIE XYZ
171171
// using D50 (so no chromatic adaptation needed afterwards)
172172
// http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
173+
// which has greater numerical precsion than section 4.3.5.3 of
174+
// https://www.adobe.com/digitalimag/pdfs/AdobeRGB1998.pdf
173175
var M = Math.matrix([
174176
[ 0.5766690429101305, 0.1855582379065463, 0.1882286462349947 ],
175177
[ 0.29734497525053605, 0.6273635662554661, 0.07529145849399788 ],
@@ -180,7 +182,7 @@ function lin_a98rgb_to_XYZ(rgb) {
180182
}
181183

182184
function XYZ_to_lin_a98rgb(XYZ) {
183-
// convert XYZ to linear-light ProPhotoRGB
185+
// convert XYZ to linear-light a98rgb
184186
var M = Math.matrix([
185187
[ 2.0415879038107465, -0.5650069742788596, -0.34473135077832956 ],
186188
[ -0.9692436362808795, 1.8759675015077202, 0.04155505740717557 ],

0 commit comments

Comments
 (0)