@mkbabb/value.js 0.4.4 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/value.d.ts +2 -0
  2. package/dist/value.js +5238 -0
  3. package/package.json +1 -1
  4. package/dist/CNAME +0 -1
  5. package/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  6. package/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  7. package/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  8. package/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  9. package/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  10. package/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  11. package/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  12. package/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  13. package/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  14. package/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  15. package/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  16. package/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  17. package/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  18. package/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  19. package/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  20. package/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  21. package/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  22. package/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  23. package/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  24. package/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  25. package/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  26. package/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  27. package/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  28. package/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  29. package/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  30. package/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  31. package/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  32. package/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  33. package/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  34. package/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  35. package/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  36. package/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  37. package/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  38. package/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  39. package/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  40. package/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  41. package/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  42. package/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  43. package/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  44. package/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  45. package/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  46. package/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  47. package/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  48. package/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  49. package/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  50. package/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  51. package/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  52. package/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  53. package/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  54. package/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  55. package/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  56. package/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  57. package/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  58. package/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  59. package/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  60. package/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  61. package/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  62. package/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  63. package/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  64. package/dist/assets/Katex-ClrxLHTj.js +0 -131
  65. package/dist/assets/Katex-rb5Khf8S.css +0 -1
  66. package/dist/assets/favicon-BpOvZXpk.svg +0 -20
  67. package/dist/assets/hsl-hvHpFpJT.js +0 -1
  68. package/dist/assets/hsv-Dw3FShnj.js +0 -1
  69. package/dist/assets/hwb-pA6JoiNj.js +0 -1
  70. package/dist/assets/index-Q19pIqw1.js +0 -32
  71. package/dist/assets/index-VnEkwzsm.css +0 -1
  72. package/dist/assets/kelvin-Csjui27y.js +0 -1
  73. package/dist/assets/lab-DAj67vs8.js +0 -1
  74. package/dist/assets/lch-D_dY1vUG.js +0 -1
  75. package/dist/assets/oklab-BPM7MOIw.js +0 -1
  76. package/dist/assets/oklch-DwTrS_34.js +0 -1
  77. package/dist/assets/rgb-BLbQuf-A.js +0 -1
  78. package/dist/assets/vendor-highlight-sMWp9TLU.js +0 -3
  79. package/dist/assets/vendor-katex-Dehg5p_Y.js +0 -261
  80. package/dist/assets/vendor-prettier-wO8BBsoP.js +0 -166
  81. package/dist/assets/xyz-CX5zPyPG.js +0 -3
  82. package/dist/index.html +0 -18
@@ -1,3 +0,0 @@
1
- import{K as r,r as m,x as g,f as c,l as h}from"./Katex-ClrxLHTj.js";import{g as f,W as b}from"./index-Q19pIqw1.js";import{J as v,V as y,a0 as e,a1 as n,a2 as i,u as o,a6 as d,N as s}from"./vendor-highlight-sMWp9TLU.js";import"./vendor-katex-Dehg5p_Y.js";import"./vendor-prettier-wO8BBsoP.js";const x={class:"markdown-body"},C={class:"language-typescript"},Y={class:"language-typescript"},w={class:"language-typescript"},X={class:"language-typescript"},Z={class:"language-typescript"},N={__name:"xyz",setup(D,{expose:u}){u({frontmatter:{}});const{x:a,y:l,z:p}=f("xyz");return(B,t)=>(v(),y("div",x,[t[4]||(t[4]=e("h3",null,"Attributes",-1)),e("ul",null,[e("li",null,[t[0]||(t[0]=e("code",null,"X",-1)),n(": Response curve to red ("+i(o(a).min)+" to "+i(o(a).max)+")",1)]),e("li",null,[t[1]||(t[1]=e("code",null,"Y",-1)),n(": Luminance ("+i(o(l).min)+" to "+i(o(l).max)+")",1)]),e("li",null,[t[2]||(t[2]=e("code",null,"Z",-1)),n(": Response curve to blue ("+i(o(p).min)+" to "+i(o(p).max)+")",1)])]),t[5]||(t[5]=d('<h3>Historical Context</h3><p>CIE XYZ (1931) was the first mathematically defined color space. The <a href="https://en.wikipedia.org/wiki/International_Commission_on_Illumination">Commission Internationale de l’Eclairage</a> derived it from experiments mapping how a standard observer responds to wavelengths of visible light. It’s device-independent by design—colors are specified as points in an abstract tristimulus space, not as instructions for a particular display or printer.</p><p>In value.js, <strong>XYZ is the conversion hub</strong>: most color space transforms pass through it.</p><hr><h2>Key Characteristics</h2><ol><li><strong>Device-independent.</strong> XYZ values describe a color itself, not how to reproduce it on hardware.</li><li><strong>Complete gamut.</strong> Encompasses all colors visible to the human eye—no clipping to an RGB or CMYK subset.</li><li><strong>Foundation space.</strong> Lab, Luv, and virtually every perceptual model derives from XYZ.</li><li><strong>Standardized white points.</strong> D50, D65, and others provide fixed reference whites for consistent colorimetry.</li></ol><h2>Advantages</h2><ul><li>Device-independent</li><li>Encompasses all visible colors</li><li>Mathematical basis for all other CIE-derived color spaces</li><li>Direct relationship to the standard observer model</li></ul><h2>Disadvantages</h2><ul><li>Not perceptually uniform—equal numeric steps don’t look equal</li><li>Components are abstract; <code>X</code> and <code>Z</code> don’t map to any intuitive visual attribute</li><li>Not directly usable for display or print output</li></ul><hr><h2>Color Model</h2><h3>Components</h3><ol><li><p><strong><code>X</code></strong>: A weighted mix of cone response curves, roughly tracking red sensitivity. Not a pure spectral response—it’s a mathematical construct chosen so that all tristimulus values remain non-negative.</p></li><li><p><strong><code>Y</code></strong>: Corresponds directly to luminance. Matches the CIE photopic luminosity function, so it doubles as a measure of perceived brightness.</p></li><li><p><strong><code>Z</code></strong>: Roughly tracks blue sensitivity. Like <code>X</code>, it’s primarily a mathematical convenience rather than a direct perceptual correlate.</p></li></ol><p>Colors in XYZ are points in a 3D space. <code>Y</code> carries brightness information; <code>X</code> and <code>Z</code> don’t correspond to perceptual attributes on their own. This makes XYZ a conversion intermediary, not a creative tool.</p><h3>White Points and Chromatic Adaptation</h3><p>XYZ values are relative to a reference white point:</p><ul><li><strong>D50</strong>: Standard for graphic arts and printing (slightly warm/yellowish)</li><li><strong>D65</strong>: Standard for digital imaging, approximating average daylight (slightly cool/bluish)</li></ul><p>Converting between white points requires chromatic adaptation. value.js uses the Bradford transform:</p>',19)),e("div",C,[n(" // D65 to D50 transformation matrix "+i(o(b))+" ",1),t[3]||(t[3]=e("pre",null,[e("code",null,`// D50 to D65 transformation matrix
2
- {{ WHITE_POINT_D50_D65 }}
3
- `)],-1))]),t[6]||(t[6]=e("hr",null,null,-1)),t[7]||(t[7]=e("h2",null,"Color Conversions",-1)),t[8]||(t[8]=e("h3",null,"RGB to XYZ",-1)),t[9]||(t[9]=e("p",null,"Linearize sRGB (undo the gamma curve), then multiply by the 3×3 sRGB-to-XYZ matrix:",-1)),s(o(r),{expression:"\\mathbf{rgb}_{\\text{linear}} = \\gamma^{-1}(\\mathbf{rgb}), \\quad \\begin{bmatrix} X \\\\ Y \\\\ Z \\end{bmatrix} = M_{\\text{sRGB}} \\cdot \\mathbf{rgb}_{\\text{linear}}"}),t[10]||(t[10]=e("p",null,"The sRGB transfer function is piecewise: linear below ~0.04045, power-law (exponent 2.4) above.",-1)),e("div",Y,i(o(m)),1),t[11]||(t[11]=e("h3",null,"XYZ to RGB",-1)),t[12]||(t[12]=e("p",null,"Multiply by the inverse matrix, then apply the sRGB gamma curve:",-1)),s(o(r),{expression:"\\mathbf{rgb}_{\\text{linear}} = M_{\\text{sRGB}}^{-1} \\begin{bmatrix} X \\\\ Y \\\\ Z \\end{bmatrix}, \\quad \\mathbf{rgb} = \\gamma(\\mathbf{rgb}_{\\text{linear}})"}),e("div",w,i(o(g)),1),t[13]||(t[13]=e("h3",null,"XYZ to Lab",-1)),t[14]||(t[14]=e("p",null,"Normalize by the white point, apply the CIE perceptual function, then scale:",-1)),s(o(r),{expression:"L^* = 116\\, f\\!\\left(\\frac{Y}{Y_n}\\right) - 16, \\quad a^* = 500\\left[f\\!\\left(\\frac{X}{X_n}\\right) - f\\!\\left(\\frac{Y}{Y_n}\\right)\\right], \\quad b^* = 200\\left[f\\!\\left(\\frac{Y}{Y_n}\\right) - f\\!\\left(\\frac{Z}{Z_n}\\right)\\right]"}),e("div",X,i(o(c)),1),t[15]||(t[15]=e("h3",null,"Lab to XYZ",-1)),t[16]||(t[16]=e("p",null,"Invert the L*a*b* formulas and scale by the white point:",-1)),s(o(r),{expression:"f_y = \\frac{L^* + 16}{116}, \\quad f_x = \\frac{a^*}{500} + f_y, \\quad f_z = f_y - \\frac{b^*}{200}"}),e("div",Z,i(o(h)),1),t[17]||(t[17]=d("<hr><h2>Applications</h2><ol><li><strong>Color management.</strong> ICC profiles define device gamuts in XYZ; all profile-to-profile conversions transit through it.</li><li><strong>Colorimetry.</strong> Spectrophotometers report measurements in XYZ or its derivatives.</li><li><strong>Cross-media reproduction.</strong> The device-independent anchor that lets a print proof match a monitor preview.</li><li><strong>Color difference metrics.</strong> Delta E formulas operate in Lab/Luv, both derived from XYZ.</li><li><strong>Appearance models.</strong> CIECAM02 and similar models take XYZ as input to predict how a color looks under different viewing conditions.</li></ol>",3))]))}};export{N as default};
package/dist/index.html DELETED
@@ -1,18 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>Color Picker</title>
8
- <link rel="icon" type="image/svg+xml" href="./assets/favicon-BpOvZXpk.svg" />
9
-
10
- <script type="module" crossorigin src="./assets/index-Q19pIqw1.js"></script>
11
- <link rel="modulepreload" crossorigin href="./assets/vendor-highlight-sMWp9TLU.js">
12
- <link rel="modulepreload" crossorigin href="./assets/vendor-prettier-wO8BBsoP.js">
13
- <link rel="modulepreload" crossorigin href="./assets/vendor-katex-Dehg5p_Y.js">
14
- <link rel="stylesheet" crossorigin href="./assets/index-VnEkwzsm.css">
15
- </head>
16
-
17
- <body class="relative" id="app"></body>
18
- </html>