Skip to content

Commit

Permalink
🚧 Convert RGBColor to hex string
Browse files Browse the repository at this point in the history
Not sure what value was being used previously. I should check...
  • Loading branch information
victorlin committed Oct 29, 2024
1 parent b75ced5 commit 066d1e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/util/colorScale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,13 @@ function createScaleForGenotype(
const range = [unknownColor, ...genotypeColors.slice(0, trueValues.length)];
// Bases are returned by orderOfGenotypeAppearance in order, unknowns at end
if (legendValues.indexOf("-") !== -1) {
range.push(rgb(217, 217, 217));
range.push(rgb(217, 217, 217).formatHex());
}
if (legendValues.indexOf("N") !== -1 && !aaGenotype) {
range.push(rgb(153, 153, 153));
range.push(rgb(153, 153, 153).formatHex());
}
if (legendValues.indexOf("X") !== -1) {
range.push(rgb(102, 102, 102));
range.push(rgb(102, 102, 102).formatHex());
}
return {
colorScale: scaleOrdinal().domain(domain).range(range),
Expand Down

0 comments on commit 066d1e1

Please sign in to comment.