INNER CODE UNIT · JavaScript

hue

sirius-ms/sirius · lcms2/viewer/viewer.js:127

    const hue = (index * 137.508) % 360;

    // Set saturation and lightness to reasonable values
    const saturation = 70;
    const lightness = 60;

    // Convert HSL to RGB using D3.js
    const rgbColor = d3.hsl(hue, saturation, lightness).toString();

    return rgbColor;
}

  var parentMax = 0.0
  for (var i=0; i < data.parent.length; ++i) {
    parentMax = Math.max(parentMax, data.parent[i]);
  }
  const parent = data.rt.map(function(x,i){return {x: x, y: data.parent[i]};});
  const children = Object.keys(data.children).map(function(name,index){

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…