Цветовой круг LCh с шагом сегментов в 1 градус hue

  • Автор темы Автор темы mihas
  • Дата начала Дата начала
Статус
Закрыто для дальнейших ответов.

mihas

Топикстартер
15 лет на форуме
Сообщения
4 860
Реакции
2 882
Нарисовал скриптом правильный цветовой круг, где все 360 сегментов точно соотнесены с соответствующим углом hue. Получилось как-то так, голубая область уж очень большая:
cyrclesRGB.php.png
Скрипт работает тут: http://rudtp.pp.ru/cyrclesRGB.php
Для любознательных вот текст скрипта:
Код:
<?php
//Автор Михаил Сартаков, написано 2016.11.21
$image = imagecreatetruecolor(1002, 1002);
$white = imagecolorallocate($image,255,255,255);
imagefill($image, 1, 1, $white);
$color = array();
$values = array();
for ($e=0; $e < 360; $e++){
$color[$e] = imagecolorallocate($image,$red[$e],$green[$e],$blue[$e]);
$values[$e] = array(
            501,  501,   // Point 3 (x, y)
            intval($a[$e]*10+501),  intval($b[$e]*10+501),  // Point 1 (x, y)
            intval($a[$e+1]*10+501),  intval($b[$e+1]*10+501) // Point 2 (x, y)
            );
imagefilledpolygon($image, $values[$e], 3, $color[$e]);
}
imageflip($image, IMG_FLIP_VERTICAL);
// вывод изображения
header('Content-type: image/png');
imagepng($image);
imagedestroy($image);
?>
В начале этого скрипта массивы идут - отдельным постом, иначе не разрешает чуть более 1000 символов кода форум.
 
  • Спасибо
Реакции: ch_alex
Вот массивы для скрипта из предыдущего поста:
Код:
<?php
//Автор Михаил Сартаков, написано 2016.11.21
$red = array(253,253,252,252,251,251,251,250,250,249,249,249,249,248,248,248,248,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,248,248,248,248,249,249,250,250,251,251,252,252,253,254,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,252,249,246,242,239,235,230,226,222,217,212,208,203,198,193,187,182,177,171,165,159,153,147,141,134,127,119,112,103,94,84,73,60,43,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,36,48,59,70,80,90,99,109,118,126,134,141,148,154,160,165,170,174,179,182,186,190,193,196,199,202,204,207,209,212,214,216,218,220,222,224,226,228,230,231,233,235,236,238,239,241,242,244,245,247,248,249,251,252,254,254,253,253);
$green = array(12,14,13,12,11,9,7,5,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,17,27,35,43,51,59,66,73,80,86,93,99,105,110,116,121,125,130,134,139,143,147,151,155,159,163,166,170,174,177,181,184,187,191,194,197,201,204,207,210,213,216,219,222,225,228,231,234,236,239,241,244,246,248,250,252,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,254,254,253,253,252,252,252,251,251,251,250,250,250,249,249,249,249,249,249,249,250,250,250,250,250,250,250,251,251,251,251,251,251,251,251,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,253,253,253,253,253,253,254,253,254,254,254,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,251,251,250,250,249,248,246,245,244,243,242,240,239,238,236,235,234,232,231,229,228,226,225,223,222,220,218,217,215,214,212,210,209,207,205,204,202,200,199,197,195,193,192,190,188,186,184,183,181,179,177,175,173,171,169,167,165,163,161,159,157,155,153,151,149,147,145,143,141,138,136,134,132,130,127,125,123,121,118,116,114,111,109,107,104,102,99,97,94,91,89,86,83,80,77,74,71,67,64,60,56,52,47,42,36,30,21,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,5,6,7,8,7,8,10,12,12);
$blue = array(138,135,132,130,127,124,121,118,115,113,110,107,104,101,98,96,93,90,87,84,81,78,76,73,70,67,64,61,58,54,51,48,44,41,37,33,29,24,18,12,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,7,9,11,13,14,15,16,16,15,14,12,9,5,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,19,30,39,47,54,61,68,74,80,86,91,97,102,107,112,117,122,127,131,136,140,145,149,153,157,161,165,169,173,176,180,183,187,190,193,196,199,202,205,208,210,213,215,218,220,223,225,227,229,231,233,235,237,239,241,242,244,246,247,248,250,251,251,252,253,253,254,254,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,254,254,254,254,254,254,253,253,253,253,253,253,253,252,252,252,252,252,251,251,251,251,251,250,250,250,249,249,248,248,247,245,244,242,240,238,236,233,231,228,226,223,221,218,216,214,211,209,207,205,203,201,199,197,195,193,191,189,187,185,183,181,180,178,176,174,173,171,169,167,165,164,162,160,158,157,155,153,151,149,148,146,143,141,138);
$a = array(50.0,49.9925,49.9692,49.9315,49.8783,49.8098,49.7261,49.6275,49.5135,49.3844,49.2403,49.0813,48.9076,48.7185,48.5149,48.2964,48.0631,47.8154,47.5529,47.2761,46.9848,46.6788,46.3589,46.0252,45.6771,45.3152,44.9395,44.5502,44.1473,43.7312,43.3012,42.8583,42.4023,41.9337,41.4518,40.9576,40.4508,39.9318,39.4003,38.8573,38.3023,37.7358,37.1574,36.5677,35.9669,35.3553,34.7331,34.1000,33.4565,32.8031,32.1396,31.4660,30.7832,30.0906,29.3890,28.6789,27.9594,27.2318,26.4961,25.7520,25.0000,24.2405,23.4734,22.6993,21.9185,21.1309,20.3367,19.5367,18.7302,17.9184,17.1011,16.2785,15.4510,14.6186,13.7818,12.9409,12.0960,11.2476,10.3956,9.5405,8.6826,7.8215,6.9586,6.0935,5.2264,4.3577,3.4878,2.6168,1.7450,0.8726,-0.0000,-0.8725,-1.7449,-2.6167,-3.4878,-4.3578,-5.2265,-6.0936,-6.9586,-7.8218,-8.6825,-9.5404,-10.3955,-11.2474,-12.0960,-12.9410,-13.7817,-14.6186,-15.4508,-16.2784,-17.1011,-17.9184,-18.7303,-19.5365,-20.3370,-21.1309,-21.9185,-22.6995,-23.4737,-24.2405,-25.0001,-25.7518,-26.4958,-27.2319,-27.9598,-28.6789,-29.3893,-30.0908,-30.7831,-31.4661,-32.1394,-32.8030,-33.4564,-34.0999,-34.7329,-35.3555,-35.9671,-36.5676,-37.1571,-37.7353,-38.3023,-38.8572,-39.4008,-39.9319,-40.4510,-40.9577,-41.4520,-41.9334,-42.4023,-42.8584,-43.3011,-43.7308,-44.1475,-44.5504,-44.9397,-45.3154,-45.6774,-46.0251,-46.3591,-46.6791,-46.9846,-47.2760,-47.5529,-47.8151,-48.0632,-48.2964,-48.5147,-48.7185,-48.9075,-49.0813,-49.2404,-49.3846,-49.5134,-49.6271,-49.7260,-49.8097,-49.8782,-49.9315,-49.9696,-49.9924,-50.0000,-49.9924,-49.9695,-49.9315,-49.8782,-49.8099,-49.7262,-49.6274,-49.5133,-49.3844,-49.2403,-49.0813,-48.9073,-48.7183,-48.5149,-48.2964,-48.0630,-47.8152,-47.5528,-47.2760,-46.9846,-46.6790,-46.3591,-46.0253,-45.6773,-45.3153,-44.9396,-44.5503,-44.1472,-43.7311,-43.3011,-42.8582,-42.4026,-41.9337,-41.4519,-40.9576,-40.4511,-39.9318,-39.4006,-38.8572,-38.3023,-37.7354,-37.1571,-36.5675,-35.9671,-35.3553,-34.7330,-34.0999,-33.4565,-32.8030,-32.1394,-31.4660,-30.7831,-30.0907,-29.3893,-28.6786,-27.9596,-27.2322,-26.4960,-25.7519,-25.0000,-24.2407,-23.4735,-22.6993,-21.9187,-21.1310,-20.3368,-19.5368,-18.7303,-17.9183,-17.1013,-16.2784,-15.4509,-14.6184,-13.7820,-12.9409,-12.0961,-11.2477,-10.3952,-9.5402,-8.6826,-7.8220,-6.9585,-6.0934,-5.2264,-4.3574,-3.4878,-2.6165,-1.7448,-0.8725,0.0001,0.8723,1.7445,2.6169,3.4880,4.3580,5.2265,6.0930,6.9586,7.8215,8.6820,9.5404,10.3953,11.2476,12.0955,12.9406,13.7818,14.6189,15.4503,16.2788,17.1014,17.9183,18.7304,19.5366,20.3362,21.1303,21.9189,22.6996,23.4737,24.2403,25.0001,25.7517,26.4961,27.2326,27.9604,28.6790,29.3898,30.0909,30.7830,31.4657,32.1401,32.8032,33.4561,34.1005,34.7333,35.3551,35.9675,36.5680,37.1573,37.7353,38.3018,38.8573,39.4005,39.9317,40.4509,40.9575,41.4520,41.9335,42.4028,42.8586,43.3011,43.7308,44.1471,44.5503,44.9397,45.3155,45.6770,46.0254,46.3590,46.6786,46.9845,47.2760,47.5531,47.8154,48.0629,48.2964,48.5147,48.7184,48.9074,49.0815,49.2402,49.3846,49.5133,49.6276,49.7259,49.8098,49.8784,49.9317,49.9696,49.9925,50.0);
$b = array(0.0,0.8725,1.7450,2.6169,3.4877,4.3578,5.2264,6.0935,6.9587,7.8217,8.6825,9.5404,10.3954,11.2474,12.0961,12.9410,13.7819,14.6185,15.4508,16.2783,17.1009,17.9183,18.7304,19.5365,20.3370,21.1308,21.9186,22.6994,23.4737,24.2403,25.0002,25.7521,26.4958,27.2319,27.9595,28.6787,29.3892,30.0907,30.7833,31.4662,32.1393,32.8027,33.4567,34.0997,34.7332,35.3554,35.9669,36.5677,37.1571,37.7357,38.3020,38.8573,39.4004,39.9319,40.4508,40.9578,41.4518,41.9336,42.4024,42.8584,43.3012,43.7310,44.1474,44.5505,44.9396,45.3153,45.6772,46.0253,46.3591,46.6791,46.9845,47.2760,47.5527,47.8152,48.0631,48.2962,48.5147,48.7185,48.9074,49.0814,49.2403,49.3845,49.5134,49.6273,49.7262,49.8097,49.8782,49.9314,49.9695,49.9923,50.0000,49.9923,49.9696,49.9315,49.8781,49.8097,49.7262,49.6274,49.5135,49.3844,49.2404,49.0813,48.9073,48.7185,48.5147,48.2962,48.0631,47.8152,47.5528,47.2760,46.9846,46.6791,46.3591,46.0252,45.6773,45.3153,44.9397,44.5504,44.1474,43.7309,43.3013,42.8584,42.4023,41.9335,41.4519,40.9576,40.4508,39.9317,39.4006,38.8573,38.3023,37.7355,37.1573,36.5678,35.9670,35.3553,34.7329,34.1000,33.4565,32.8030,32.1394,31.4660,30.7830,30.0908,29.3892,28.6788,27.9596,27.2319,26.4960,25.7519,25.0000,24.2404,23.4736,22.6996,21.9186,21.1310,20.3368,19.5365,18.7303,17.9184,17.1010,16.2784,15.4509,14.6186,13.7819,12.9410,12.0960,11.2475,10.3956,9.5405,8.6824,7.8218,6.9587,6.0935,5.2264,4.3578,3.4878,2.6168,1.7450,0.8727,0.0001,-0.8727,-1.7450,-2.6168,-3.4878,-4.3578,-5.2264,-6.0934,-6.9586,-7.8217,-8.6824,-9.5404,-10.3956,-11.2476,-12.0961,-12.9409,-13.7819,-14.6186,-15.4508,-16.2784,-17.1010,-17.9184,-18.7303,-19.5366,-20.3368,-21.1309,-21.9185,-22.6995,-23.4736,-24.2405,-25.0000,-25.7520,-26.4959,-27.2319,-27.9596,-28.6788,-29.3892,-30.0907,-30.7831,-31.4660,-32.1394,-32.8029,-33.4566,-34.1000,-34.7329,-35.3553,-35.9670,-36.5677,-37.1573,-37.7356,-38.3021,-38.8573,-39.4006,-39.9318,-40.4508,-40.9576,-41.4519,-41.9335,-42.4024,-42.8584,-43.3013,-43.7309,-44.1474,-44.5504,-44.9397,-45.3154,-45.6773,-46.0252,-46.3591,-46.6790,-46.9846,-47.2760,-47.5528,-47.8153,-48.0631,-48.2964,-48.5148,-48.7184,-48.9074,-49.0814,-49.2404,-49.3844,-49.5134,-49.6273,-49.7260,-49.8098,-49.8781,-49.9315,-49.9696,-49.9925,-50.0001,-49.9923,-49.9695,-49.9315,-49.8783,-49.8098,-49.7262,-49.6272,-49.5135,-49.3843,-49.2402,-49.0812,-48.9073,-48.7185,-48.5147,-48.2962,-48.0631,-47.8152,-47.5526,-47.2760,-46.9847,-46.6789,-46.3594,-46.0252,-45.6772,-45.3153,-44.9396,-44.5505,-44.1475,-43.7308,-43.3013,-42.8584,-42.4025,-41.9337,-41.4522,-40.9575,-40.4510,-39.9319,-39.4006,-38.8572,-38.3022,-37.7357,-37.1571,-36.5679,-35.9671,-35.3553,-34.7331,-34.0999,-33.4565,-32.8029,-32.1393,-31.4660,-30.7831,-30.0908,-29.3892,-28.6787,-27.9596,-27.2319,-26.4961,-25.7520,-24.9999,-24.2405,-23.4735,-22.6995,-21.9185,-21.1310,-20.3368,-19.5366,-18.7303,-17.9183,-17.1010,-16.2785,-15.4509,-14.6187,-13.7817,-12.9409,-12.0961,-11.2476,-10.3955,-9.5405,-8.6823,-7.8218,-6.9587,-6.0934,-5.2265,-4.3578,-3.4878,-2.6169,-1.7450,-0.8726,0.0);
?>
Не дает форум записать код CGATS17 всего 12 кб циферок Lab собственно из чего эти массивы посчитаны, если нужно кому - пришлю.
 
Последнее редактирование:
  • Спасибо
Реакции: ch_alex
Неправильно. Желтый должен быть 90°.

Т.к. круг по цвету условный, то рисуй HSV и -30° hue.

Код:
void HsvToRgb(const double &h, const double &s, const  double &v, double &r, double &g, double &b)
{
    double sectorPos, fractionalSector, p, q, t;
    int sectorNumber;

    if (s == 0.0)
    {
        r = v;
        g = v;
        b = v;
    }
    else
    {
        sectorPos = h / 60.0;
        sectorNumber = floor(sectorPos);
        fractionalSector = sectorPos - (double)sectorNumber;
        p = v * (1.0 - s);
        q = v * (1.0 - (s * fractionalSector));
        t = v * (1.0 - (s * (1.0 - fractionalSector)));

        if (sectorNumber > 5) { sectorNumber = 5; }
        if (sectorNumber < 0) { sectorNumber = 0; }

        switch (sectorNumber)
        {
            case 0: { r = v; g = t; b = p; break; }
            case 1: { r = q; g = v; b = p; break; }
            case 2: { r = p; g = v; b = t; break; }
            case 3: { r = p; g = q; b = v; break; }
            case 4: { r = t; g = p; b = v; break; }
            case 5: { r = v; g = p; b = q; break; }
            default: break;
        }
    }
}
 
Неправильно. Желтый должен быть 90°.
Не понял - всегда желтый был градуса 93.
Потом если ты пипеткой ткнешь в 90 градусов в модели sRGB - ты получишь ровно 90 градусов по hue. Или 0 по a-координате. Но я посмотрю вечерком - может и правда там загогулина есть на меньшей Chroma.
 
Последнее редактирование:
У тебя-то около 100. И синий где?

Т.к. колориметрически это все равно неверно, иллюстративно должно получиться так:

WheelPre.jpg
 
Ладно, буду допиливать!
 
cyrclesRGBnew.png
Ну смотри, я прошелся по краю охвата sRGB еще раз, с крохотным запасом чтобы точно не вылетать, то есть в диапазоне 0.5-254.5. При интерполяции где 0.5 в 1 посчиталось, где в 0, главное не вылетел точно. Проверил с пипеткой - все углы строго на месте, 0, 90, 180, 270 градусов по hue ровно там, где и должны быть.
У тебя @TRANTOR, красивая картинка, но не имеет ничего общего с углами hue в LCh. Может мы как-то задачу по-разному поняли? Я хотел получить 360 абсолютно точных углов по hue, идеальную ab-проекцию, где каждый угол точно соответствует углу по hue, на краю охвата sRGB, ну на сколько 8 бит конечно позволяет. Получил. Четкое совпадение с фотошоп, то есть как и в нем Lab D50 2 гр с адаптацией по Брэдфорду к D65 sRGB. Массив такой через интерполяцию по колонке hue:
Код:
$red = array(255,254,255,255,254,254,254,255,255,254,255,254,255,255,255,255,254,254,254,254,254,254,254,255,255,254,255,254,254,254,255,254,255,254,254,255,254,254,254,255,254,254,255,254,255,254,254,255,254,254,255,255,254,255,255,254,254,254,255,254,255,254,255,255,254,255,255,254,254,255,255,255,254,254,254,254,255,254,255,254,254,254,255,254,254,255,255,254,254,254,254,255,254,254,254,254,255,254,254,254,252,249,245,241,237,233,229,225,221,216,212,208,203,199,195,190,185,180,176,170,165,160,154,148,142,136,129,121,113,105,95,84,71,54,26,0,0,0,0,1,1,0,1,0,1,1,0,0,1,0,0,1,0,1,0,0,1,1,1,1,0,1,0,0,0,0,1,0,0,0,0,0,1,0,1,0,1,1,0,0,1,1,1,0,1,1,0,1,1,0,0,1,0,0,1,1,3,0,1,1,1,0,0,0,1,0,1,1,0,1,1,1,1,1,0,0,0,1,1,0,0,1,1,1,0,0,0,1,1,1,0,0,1,0,1,0,0,0,1,1,0,1,1,0,0,1,0,0,1,0,0,0,0,0,1,0,0,1,1,0,0,1,0,0,1,1,1,0,1,1,1,0,1,1,1,0,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,0,0,1,1,1,39,64,81,95,107,118,127,136,145,153,160,168,175,182,188,195,201,207,213,219,225,231,237,243,248,251,254,255,255,254,254,254,255,254,254,255,254,255,254,255,254,254,255,254,254,255,255,254,255,254,254,255,254,254,254,255,254,254,255);
$green = array(0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,1,1,1,1,1,0,0,1,0,0,1,1,0,0,1,1,1,0,1,0,0,1,1,1,1,1,8,33,46,56,64,71,77,83,89,94,98,103,107,111,115,118,122,125,129,132,135,139,142,145,148,151,154,157,159,162,165,168,171,174,177,179,182,185,188,191,194,196,199,202,205,208,211,214,217,221,224,227,230,234,237,241,245,248,252,253,255,255,254,254,254,255,254,255,255,255,255,255,255,254,254,254,255,254,255,255,255,254,254,254,254,255,254,254,255,255,254,254,255,254,254,254,255,254,254,254,254,254,254,254,254,255,255,254,255,255,254,255,254,254,255,255,254,254,254,255,255,255,255,255,255,254,254,255,255,254,254,255,254,255,254,255,254,255,255,255,255,254,255,255,254,255,255,254,255,255,254,255,255,254,255,254,253,252,250,248,247,245,244,242,240,239,237,236,234,233,231,230,229,227,226,224,223,222,220,219,218,216,215,214,212,211,210,208,207,206,204,203,202,200,199,198,196,195,193,192,191,189,188,187,185,184,182,181,179,178,176,175,173,172,170,169,167,165,164,162,160,158,157,155,153,151,149,147,145,143,141,139,137,134,132,130,127,125,122,120,117,114,111,108,105,102,98,95,91,87,83,79,74,70,64,59,52,45,37,26,9,0,1,1,1,1,1,0,0,0,0,0,1,0,1,0,0,0,0,1,1,0,1,1,1,1,6,1,0,1,1,1,1,1,0,1,0,1,1,1,0,0,1,0,1,1,0,0,1,1,1,1,0,1,1,1,0,1,1,0);
$blue = array(138,135,133,130,128,125,123,120,118,115,112,110,107,105,102,100,97,94,92,89,86,84,81,78,75,72,69,66,63,60,57,53,50,46,42,38,34,29,23,17,8,0,0,0,1,1,0,1,0,1,0,1,0,1,0,0,1,1,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,1,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1,1,0,0,0,0,0,1,1,1,0,0,1,1,0,0,1,0,0,1,0,1,0,0,1,0,23,42,55,65,74,82,89,96,102,108,114,119,124,129,133,137,142,146,150,153,157,161,164,167,170,174,177,180,183,185,188,191,193,196,199,201,203,206,208,210,213,215,217,219,221,223,225,228,229,231,233,235,237,239,241,243,245,247,248,250,252,253,253,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,252,250,244,239,234,230,225,221,217,213,209,205,201,197,194,191,187,184,181,178,174,171,168,165,163,160,157,154,151,149,146,143,141,138);
srgb.PNG
Вот полученная мной фигура - каждая точка под верным углом. Ну насколько 8 бит позволяет. Желтый точно не 90 градусов в sRGB да и вообще, он в минус по a-координате немного.
 
Последнее редактирование:
Специально насыщенность от нуля скриптом генерить не охота с полупрозрачностями и прочим - тут и фотошоп с блюром нормально справляется.
Lab_LCh.png
И еще немного художества от моей жены:
IMG_8110.JPG
Тут скручено айфоном изображение графика по цветоразличению Chroma difference отсюда: R U D T P . P P . R U • Исследование цветоразличительных возможностей тренированного наблюдателя
xyz.png
 
@TRANTOR, Вот и ColorThink подтверждает, что я правильную фигуру sRGB нарисовал - не 90 градусов желтый.
sRGBColorThink.PNG
 
cyrclesRGBf39.php.png
Сделал еще вариантик с верными углами по hue и по краю охвата фогры 39 (в абсолюте) - чтобы под офсет без потерь делить в профиль для меловки ISOcoated_v2. Проверил - нормально получается делить что по рилейтиву, что по абсолюту. Соответственно массив по краю фогры39 такой в sRGB:
Код:
$red = array(218,219,219,220,220,219,219,218,218,217,216,217,217,217,217,217,217,218,218,218,218,218,218,217,217,217,217,216,216,215,215,215,214,214,214,213,213,213,214,214,214,215,215,216,216,217,218,218,219,220,220,221,221,222,222,223,223,223,223,223,223,224,224,224,224,224,225,225,226,226,227,228,229,230,231,233,235,237,239,241,243,246,248,250,252,253,255,255,255,255,254,253,251,248,244,240,235,229,224,218,212,206,200,194,188,183,178,173,168,164,160,156,152,149,145,142,139,136,133,130,127,124,120,117,114,111,108,104,100,96,92,88,84,79,74,69,63,57,50,42,33,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,6,10,14,17,19,22,24,26,27,29,32,33,35,37,39,41,43,45,47,49,51,53,55,58,60,62,65,68,70,73,75,78,81,83,86,88,91,94,96,99,101,104,107,109,111,114,116,118,120,123,125,127,129,131,133,135,137,140,142,144,146,149,151,154,157,159,162,165,169,172,175,179,183,186,190,194,197,200,204,207,209,212,214,216,217,218);
$green = array(17,18,18,19,19,20,21,23,23,25,26,27,28,29,30,31,31,32,32,33,33,32,32,32,31,30,29,28,27,26,25,25,26,27,28,31,34,37,41,45,49,54,58,62,67,71,75,80,84,88,92,95,99,103,106,109,112,115,118,121,123,126,128,131,133,136,138,140,143,145,148,151,154,157,160,163,166,170,174,178,182,186,191,195,199,203,207,211,214,217,220,222,223,224,224,224,222,221,218,216,213,210,207,204,201,198,195,193,191,189,187,185,184,182,181,180,179,178,177,176,176,175,174,174,173,172,172,171,171,170,169,168,167,166,165,164,163,162,161,160,159,158,156,155,154,153,152,151,150,149,148,147,146,145,145,144,143,143,143,142,142,142,142,142,142,142,142,142,142,143,143,143,143,144,144,144,144,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,146,146,146,146,146,146,147,147,147,147,148,148,149,150,150,151,151,152,153,153,154,155,155,156,156,157,157,157,157,157,157,157,156,156,155,154,153,152,150,149,147,145,143,141,139,136,134,132,130,127,125,123,121,119,117,115,113,111,110,108,106,105,103,102,100,99,97,96,94,93,91,90,88,87,85,83,82,80,78,77,75,73,71,70,68,66,65,63,61,60,58,57,55,54,53,51,50,49,48,47,47,46,45,45,44,44,44,44,44,44,44,44,44,44,44,44,44,45,45,45,45,46,46,46,46,46,46,46,46,46,46,46,45,45,45,44,44,43,43,42,42,41,40,40,39,38,37,36,36,35,33,32,31,30,28,27,25,24,22,21,20,19,18,18,17);
$blue = array(119,117,115,113,111,109,106,104,102,99,97,96,94,92,90,88,86,84,82,80,78,75,73,70,68,65,62,59,56,53,50,48,45,42,39,37,35,33,31,29,28,27,26,26,25,25,25,25,26,26,27,28,29,30,31,31,32,33,33,33,33,34,34,33,33,33,33,32,31,30,30,28,27,25,24,21,19,15,11,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,15,21,26,31,34,37,40,42,44,46,47,49,50,51,52,53,54,55,55,56,57,57,57,58,58,58,58,58,58,58,58,57,57,57,56,56,56,56,56,56,56,56,56,56,56,57,58,58,59,60,61,62,63,65,67,68,70,72,74,76,78,81,83,85,88,90,93,95,97,100,102,105,107,109,112,114,116,118,120,122,124,126,127,129,131,133,134,136,138,139,141,142,144,146,147,149,151,152,154,156,158,160,162,164,166,168,171,173,175,178,180,183,186,188,191,193,196,198,201,203,205,208,210,211,213,215,216,217,218,218,218,218,218,217,216,215,213,211,209,207,205,203,200,198,195,193,191,189,187,185,183,181,179,178,176,175,173,172,171,169,168,167,166,164,163,162,161,159,158,157,155,154,153,151,150,148,147,146,144,143,142,140,139,138,136,135,134,133,132,131,130,129,129,128,128,127,127,126,126,126,126,126,126,126,126,126,126,126,127,127,127,127,128,128,128,128,128,128,128,128,128,128,128,128,128,127,127,127,127,126,126,126,126,125,125,125,125,125,125,125,125,126,126,126,126,127,127,127,127,127,127,126,126,125,124,123,122,121,119);
Надо теперь выбор массива написать при запуске скрипта.
 
spectralcalc_PNG_image_2016_11_26_02_42_34_AM.png
Логичным продолжением рисования цвета на PHP допилил немного таких графиков по запросу. В спектральном калькуляторе появилась кнопка у графиков - отрисовать в хайрезе. Не у всех графиков пока - всем допишу со временем.
 
  • Спасибо
Реакции: Dresden
Статус
Закрыто для дальнейших ответов.