Zenbot: Question on odd coloring on currency output.

Created on 25 Jan 2018  路  7Comments  路  Source: DeviaVir/zenbot

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

enhancement question

All 7 comments

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.

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

Pretty much this.

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

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.

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.

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?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sam-perez picture sam-perez  路  5Comments

nedievas picture nedievas  路  4Comments

MCrypto picture MCrypto  路  5Comments

voltz67 picture voltz67  路  5Comments

gleblanc1783 picture gleblanc1783  路  3Comments