(mode)
| 493 | } |
| 494 | |
| 495 | function getChannelsAndFunction(mode) { |
| 496 | let c1, c2, c3, func, yMin, yMax, yMin2, yMax2, c1Label, c2Label, c3Label; |
| 497 | if (mode === 'RGB') { |
| 498 | func = 'hsl'; |
| 499 | c1 = 0; |
| 500 | c1Label = `Hue (HSL - H)`; |
| 501 | c2 = 1; |
| 502 | c2Label = `Saturation (HSL - S)`; |
| 503 | c3 = 2; |
| 504 | c3Label = `Lightness (${mode} - L)`; |
| 505 | yMin = 0; |
| 506 | yMax = 360; |
| 507 | yMin2 = 0; |
| 508 | yMax2 = 1; |
| 509 | } |
| 510 | if (mode === 'LAB') { |
| 511 | func = 'lab'; |
| 512 | c1 = 1; |
| 513 | c1Label = `Redness / Greenness (${mode} - A)`; |
| 514 | c2 = 2; |
| 515 | c2Label = `Blueness / Yellowness (${mode} - B)`; |
| 516 | c3 = 0; |
| 517 | c3Label = `Lightness (${mode} - L)`; |
| 518 | } |
| 519 | if (mode === 'LCH') { |
| 520 | func = 'lch'; |
| 521 | c1 = 2; |
| 522 | c1Label = `Hue (${mode} - H)`; |
| 523 | c2 = 1; |
| 524 | c2Label = `Chroma (${mode} - C)`; |
| 525 | c3 = 0; |
| 526 | c3Label = `Lightness (${mode} - L)`; |
| 527 | yMin = 0; |
| 528 | yMax = 360; |
| 529 | } |
| 530 | if (mode === 'OKLAB') { |
| 531 | func = 'oklab'; |
| 532 | c1 = 1; |
| 533 | c1Label = `Redness / Greenness (${mode} - A)`; |
| 534 | c2 = 2; |
| 535 | c2Label = `Blueness / Yellowness (${mode} - B)`; |
| 536 | c3 = 0; |
| 537 | c3Label = `Lightness (${mode} - L)`; |
| 538 | } |
| 539 | if (mode === 'OKLCH') { |
| 540 | func = 'oklch'; |
| 541 | c1 = 2; |
| 542 | c1Label = `Hue (${mode} - H)`; |
| 543 | c2 = 1; |
| 544 | c2Label = `Chroma (${mode} - C)`; |
| 545 | c3 = 0; |
| 546 | c3Label = `Lightness (${mode} - L)`; |
| 547 | yMin = 0; |
| 548 | yMax = 360; |
| 549 | yMax2 = 0.322; |
| 550 | } |
| 551 | if (mode === 'CAM02') { |
| 552 | func = 'jab'; |
no outgoing calls
no test coverage detected