gpt4 book ai didi

javascript - Javascript 中的 CIE(色度/开尔文温度)色域

转载 作者:行者123 更新时间:2023-11-28 06:47:59 29 4
gpt4 key购买 nike

如何在 Javascript 中拥有 CIE(色度/开尔文温度)色域?

我在 Canvas 上绘制了 XYZ 到 RGB 颜色三 Angular 形,就像绘图一样 Figure 1 .

但我还需要像这样的整个 CIE Gamut 曲线 Figure 2 .

最佳答案

您可以在这里找到舌头的坐标: http://cvrl.ioo.ucl.ac.uk/

CIE x,y 色度坐标下

以下矩阵包含可见光波长的 xyz 坐标,从 380nm 开始,增量为 5nm,即 wavelength=5*i+380,其中 i行索引。

var color_spectrum = [[0.177552, 0.013201, 0.809246],
[0.177442, 0.013217, 0.809341],
[0.177229, 0.013151, 0.809620],
[0.176994, 0.013158, 0.809848],
[0.176762, 0.013031, 0.810207],
[0.176444, 0.013008, 0.810548],
[0.175992, 0.013031, 0.810976],
[0.175495, 0.013063, 0.811442],
[0.174805, 0.013330, 0.811865],
[0.173682, 0.014013, 0.812305],
[0.172229, 0.015121, 0.812651],
[0.170219, 0.016771, 0.813010],
[0.167698, 0.019066, 0.813236],
[0.164333, 0.021995, 0.813673],
[0.159806, 0.025895, 0.814300],
[0.154044, 0.030918, 0.815038],
[0.146902, 0.037868, 0.815230],
[0.138285, 0.048035, 0.813681],
[0.126680, 0.065950, 0.807371],
[0.111852, 0.094990, 0.793158],
[0.093162, 0.140862, 0.765976],
[0.070070, 0.208877, 0.721053],
[0.046225, 0.303041, 0.650733],
[0.023805, 0.420426, 0.555768],
[0.008188, 0.545406, 0.446406],
[0.003783, 0.660625, 0.335592],
[0.013933, 0.754417, 0.231650],
[0.039217, 0.814541, 0.146243],
[0.075015, 0.834925, 0.090060],
[0.115171, 0.826390, 0.058440],
[0.155958, 0.805392, 0.038649],
[0.194252, 0.780704, 0.025043],
[0.231059, 0.753119, 0.015822],
[0.267224, 0.722956, 0.009820],
[0.303004, 0.690898, 0.006098],
[0.338659, 0.657490, 0.003851],
[0.374237, 0.623227, 0.002536],
[0.409656, 0.588587, 0.001757],
[0.444712, 0.553963, 0.001325],
[0.479106, 0.519776, 0.001119],
[0.512455, 0.486535, 0.001010],
[0.544366, 0.454774, 0.000861],
[0.574321, 0.424986, 0.000693],
[0.601689, 0.397671, 0.000640],
[0.625405, 0.374058, 0.000537],
[0.646238, 0.353329, 0.000433],
[0.663443, 0.336271, 0.000287],
[0.677497, 0.322271, 0.000232],
[0.688698, 0.311093, 0.000209],
[0.697619, 0.302233, 0.000148],
[0.704787, 0.295104, 0.000109],
[0.710779, 0.289129, 0.000092],
[0.715674, 0.284243, 0.000083],
[0.719586, 0.280341, 0.000073],
[0.722479, 0.277458, 0.000063],
[0.724574, 0.275369, 0.000057],
[0.725939, 0.274007, 0.000053],
[0.727227, 0.272723, 0.000050],
[0.728210, 0.271742, 0.000048],
[0.728919, 0.271035, 0.000046],
[0.729413, 0.270542, 0.000044],
[0.729714, 0.270242, 0.000044],
[0.729876, 0.270081, 0.000043],
[0.730037, 0.269920, 0.000043],
[0.730100, 0.269857, 0.000043],
[0.730065, 0.269892, 0.000043],
[0.729957, 0.270000, 0.000043],
[0.729795, 0.270162, 0.000043],
[0.729586, 0.270370, 0.000044],
[0.729331, 0.270624, 0.000045],
[0.729049, 0.270906, 0.000045],
[0.728739, 0.271215, 0.000046],
[0.728408, 0.271545, 0.000047],
[0.728063, 0.271889, 0.000048],
[0.727689, 0.272262, 0.000049],
[0.727304, 0.272646, 0.000050],
[0.726901, 0.273048, 0.000051],
[0.726463, 0.273485, 0.000052],
[0.726021, 0.273925, 0.000053],
[0.725564, 0.274381, 0.000054],
[0.725083, 0.274861, 0.000056],
[0.724592, 0.275351, 0.000057],
[0.724094, 0.275848, 0.000058],
[0.723582, 0.276359, 0.000060],
[0.723065, 0.276874, 0.000061],
[0.722533, 0.277405, 0.000062],
[0.721995, 0.277941, 0.000064],
[0.721458, 0.278476, 0.000065],
[0.720898, 0.279035, 0.000067],
[0.720345, 0.279587, 0.000068]];

关于javascript - Javascript 中的 CIE(色度/开尔文温度)色域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33939700/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com