Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Question on odd coloring on currency output. #1225

Closed
cpjolicoeur opened this issue Jan 25, 2018 · 7 comments
Closed

Question on odd coloring on currency output. #1225

cpjolicoeur opened this issue Jan 25, 2018 · 7 comments

Comments

@cpjolicoeur
Copy link
Contributor

Curious on the regular expression used for styling the formatted currency here. It seems to result in some weird currency colors since the regex has 4 different capture groups.

So 00 shows up one way, but N0 or 0N shows up differently (where any non-zero digit in the decimals place is yellow but all zeros are gray.

What was the reasoning behind that out of curiosity instead of just displaying the whole currency string in cyan?

screenshot

@cpjolicoeur
Copy link
Contributor Author

I'd be happy to submit a PR with a change to the coloring to have at least some kind of consistent output regarding the coloring.

@trivalik
Copy link
Contributor

Without knowing, just guessing: just highlight the significant numbers, because zero do not matter.

@defkev
Copy link
Contributor

defkev commented Jan 25, 2018

Pretty much this.

@cpjolicoeur
Copy link
Contributor Author

It just appears odd to my eyes sometimes having the first digit yellow, sometimes that last digit yellow.

Visuals are totally subjective, of course, so if everyone else likes this styling better, just run with it. I was mostly curious about the UX design thought process behind it.

Thanks

@cpjolicoeur
Copy link
Contributor Author

I've always seen it displayed like this (with leading zeros the same color until you hit the first non-zero digit). Even single zeroes would be colored.

@bitcremental
Copy link
Contributor

In my opinion coloring is not only a matter of style, but meaning too (and primarily).
Current coloring scheme for close/current price seems odd to me, because I can't see any meaning in it.
I'd opt for something like this:

  1. darkened trailing zeros, because they don't affect the value (like in the preceding comment);
  2. optionally, I'd like to have updated digits highlighted, to catch with a glance the variation respect to last closing price (for example: if last closing price is 123.45 and current price is 124.45, then the characters "4.45" could be highlighted).

What about these criteria? Are there other ones to be considered?
If @cpjolicoeur you have time to work on it and to submit a PR, it's fine for me.

@cpjolicoeur
Copy link
Contributor Author

Sure, I absolutely can submit an update, I'd just want to get some consensus first on what the default coloring/styling of the currency output should be.

Anyone else here care to chime in again?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants