Skip to content

Commit

Permalink
🐛 fix: incorrect rgb colors
Browse files Browse the repository at this point in the history
  • Loading branch information
srj31 committed Feb 22, 2024
1 parent 014b481 commit 78c2bef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bundles/plotly/curve_functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function z_of(pt: Point): number {
* ```
*/
export function r_of(pt: Point): number {
return pt.color[0] ?? 0 * 255;
return ( pt.color[0] ?? 0 ) * 255;

Check warning on line 50 in src/bundles/plotly/curve_functions.ts

View workflow job for this annotation

GitHub Actions / Verify all tests pass and build success

There should be no space after this paren

Check warning on line 50 in src/bundles/plotly/curve_functions.ts

View workflow job for this annotation

GitHub Actions / Verify all tests pass and build success

There should be no space before this paren
}

/**
Expand All @@ -62,7 +62,7 @@ export function r_of(pt: Point): number {
* ```
*/
export function g_of(pt: Point): number {
return pt.color[1] ?? 0 * 255;
return ( pt.color[1] ?? 0 ) * 255;

Check warning on line 65 in src/bundles/plotly/curve_functions.ts

View workflow job for this annotation

GitHub Actions / Verify all tests pass and build success

There should be no space after this paren

Check warning on line 65 in src/bundles/plotly/curve_functions.ts

View workflow job for this annotation

GitHub Actions / Verify all tests pass and build success

There should be no space before this paren
}

/**
Expand All @@ -77,7 +77,7 @@ export function g_of(pt: Point): number {
* ```
*/
export function b_of(pt: Point): number {
return pt.color[2] ?? 0 * 255;
return ( pt.color[2] ?? 0 ) * 255;

Check warning on line 80 in src/bundles/plotly/curve_functions.ts

View workflow job for this annotation

GitHub Actions / Verify all tests pass and build success

There should be no space after this paren

Check warning on line 80 in src/bundles/plotly/curve_functions.ts

View workflow job for this annotation

GitHub Actions / Verify all tests pass and build success

There should be no space before this paren
}
export function generatePlot(
type: string,
Expand Down

0 comments on commit 78c2bef

Please sign in to comment.