question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reversing startColor/endColor does not produce expected results

See original GitHub issue

If I use <ReactSpeedometer startColor="#FF471A" endColor="#33CC33" /> I would expect reversing the startColor and endColor (<ReactSpeedometer startColor="#33CC33" endColor="#FF471A" />) would produce a gauge with exactly the opposite color range. However this is not the case.

Observe the following image. The second speedometer starts a shade darker and ends a shade lighter than what I would expect.

image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
palerdotcommented, Nov 4, 2018

@TrieBr This is the behaviour of d3.interpolateHsl. To quote d3 -

Returns an HSL color space interpolator between the two colors a and b. The colors a and b need not be in HSL; they will be converted to HSL using d3.hsl. 

I agree it is confusing. I will try to accomodate all the d3 interpolators - hcl, hsl, rgb etc so that users can select the interpolator of their choice, in upcoming versions.

0reactions
palerdotcommented, Jun 23, 2019

@TrieBr There is a new option available in 0.6.0 version with segmentColors option/prop, with which we can give custom segment colors. This option gives more control over segment colors. Here is a sample sandbox - https://codesandbox.io/embed/relaxed-silence-c3qkb

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chapter 33 Blood Chemistry and Immunology - Quizlet
List three reasons why a control may not produce expected results. deterioration of testing components as a result of expiration or improper storage;...
Read more >
The A1C Test & Diabetes | NIDDK
In some people, a blood glucose test may show diabetes when an A1C test does not. The reverse can also occur—an A1C test...
Read more >
Blood sugar test - UCSF Health
In someone who has diabetes, an abnormal result on the random blood glucose test may mean that the diabetes is not well controlled....
Read more >
Prediabetes - Diagnosis and treatment - Mayo Clinic
Blood sugar levels start to rise even before you get type 2 diabetes. Find out what steps you can take to prevent diabetes...
Read more >
The Surprising Truth About Prediabetes - CDC
Don't let the “pre” fool you. Prediabetes is a serious health condition. People with prediabetes have higher blood sugar than normal, but not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found