From 78c2beff767b83baf39d132389552eb0a931af98 Mon Sep 17 00:00:00 2001 From: Sourabh Jaiswal Date: Thu, 22 Feb 2024 13:55:39 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20incorrect=20rgb=20colors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bundles/plotly/curve_functions.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bundles/plotly/curve_functions.ts b/src/bundles/plotly/curve_functions.ts index e25fcc9ab..e0e0d9add 100644 --- a/src/bundles/plotly/curve_functions.ts +++ b/src/bundles/plotly/curve_functions.ts @@ -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; } /** @@ -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; } /** @@ -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; } export function generatePlot( type: string,