New dice roller highlight code: yellow

Be sure to read and follow the guidelines for our forums.

Nov 14, 2022 2:58 pm
I was wondering if we could get a new dice roller highlight code for yellow. Many games have results for "complicated success" or "partial successes" and it would be cool to have a yellow result to fit in between green for success and red for failure. And I know we have blue for "info" but I'm not sure what that one's original intended use was for lol.
Nov 14, 2022 3:07 pm
I like blue more than green, so I always use info instead of success.

But yes, yellow would be great. It'd have to be visible on light mode, though. I heard some people actually use that
Nov 14, 2022 5:22 pm
Might it not be better to scrap the Info/Success/Fail words in favour of just allowing users to give the color they want?

Since all these words currently do is define the colour, which the system then has to look up and map to a colour code, passing them straight through would allow the user to use any HTML colour name (ref) (like 'yellow') and be less work. Straight-up using what the user entered would probably allow them to use and colour code by entering the #000000 but we might want to limit it to a single word for sanitation and security reasons.
Nov 14, 2022 7:41 pm
nezzeraj says:
I was wondering if we could get a new dice roller highlight code for yellow. Many games have results for "complicated success" or "partial successes" and it would be cool to have a yellow result to fit in between green for success and red for failure. And I know we have blue for "info" but I'm not sure what that one's original intended use was for lol.
Append here.
Nov 14, 2022 8:16 pm
That looks simple enough. Let's gather a list of colours we want in addition to the red, green, blue, and yellow. Then I can hack them all into the .less file.

Not all of them will work inverted, but unless someone tests them I will just add the inverted rules as well and people can just not use them.
Nov 14, 2022 8:18 pm
Seems like orange and purple would be the sensible options to add at the same time
Nov 14, 2022 9:07 pm
bowlofspinach says:
Seems like orange and purple would be the sensible options to add at the same time
Yeah, the primary and secondary colours might be all we want to implement for now.

I will give it little while for more discussion and then start playing with colours to use (since it is not freeform and the site messes with the colours in dark mode, so I have to guess as to what it will do and fudge them rather than using working colours (though I don't think it messes with these colours, they are apparently taken straight from themeDark.less)):.

People are welcome to submit their choices for the color codes to use, and to object to ones that are hard to see for some people. Mention the theme you are using, or submit for both the light- and dark theme. Feel free to refer to the colours by official name or number [ref] and I can look them up if the site does not want to display what you are trying to show us.

Messed with colors:
Red
Green
Blue
Yellow
Old Yellow
Olive
Orange
Purple

Unmessed with dark theme colors:
Red
Green
Blue
Yellow
Olive
Orange
Purple

Unmessed with light theme colors:
Red
Green
Blue
Yellow
Olive
Orange
Purple
Nov 14, 2022 9:18 pm
For more advanced changes that can't be covered by CSS, see the js.

The rules are jQuery filters to select nodes, the highlighting is in the line 181 block.
Nov 14, 2022 9:25 pm
For now I will just manually enumerate the asked for colours in the .less file. changing the js will require more testing I can do at this time.
Nov 14, 2022 11:40 pm
Thanks! I think the primary and secondary colors are enough variation. Will the new additions just be "highlight": "[color]"?
Nov 14, 2022 11:44 pm
nezzeraj says:
Will the new additions just be "highlight": "[color]"?
Yes, you would just use `yellow` or `purple` instead if `info` or `success` for instance.

As now, the last one listed takes precedence. So `"highlight": "success yellow"` is effectively the same as "highlight": "yellow".
Nov 14, 2022 11:48 pm
Great! Let me know whenever the changes go live :) Thanks so much.
Nov 15, 2022 5:47 am
Might make sense to also add the option to "highlight":"green"
If possible, maybe not to replace the old code so people don't have to edit every bit of old dice code, but just as a new option
Nov 15, 2022 1:05 pm
bowlofspinach says:
... maybe not to replace the old code ...
Yep, that is my plan.

I will leave the current fail/info/success options to do what they currently do, and add red/green/blue which will do the same thing. We could talk about changing what fail/info/success do later if we want.
Jan 14, 2023 10:21 am
Has there been any updates on this?
Jan 14, 2023 11:42 am
I will try again to stand up a dev environment, but docker failed on many levels the last time (both databases did not populate, the .css and .js modules were missing, and then --after manual intervention and downloads-- the default username could not log in).

@Keleth, can you confirm that the instructions/script actually works from a clean install?

I can probably make this change without a dev environment, and push it to the staging server before we know if it works. But that is a lot more effort than being able to test it locally.
Jan 14, 2023 12:44 pm
I'm not a coder, but couldn't you just add the lines in the place Adam mentioned and just request a fork on github? Either way, thanks for trying!
Jan 14, 2023 12:49 pm
I can, but I can not test that they work or that the colours looks right (I would test colours with a userscript, but that does mean doing the work twice). I also want to make some other changes and enhancements (bulleted lists) that would require testing locally.
Jan 14, 2023 12:55 pm
Oh bulleted lists would be great! Ok, keep me updated!
Jan 15, 2023 10:27 pm
bowlofspinach says:
It'd have to be visible on light mode, though. I heard some people actually use that
Those fiends, glad I'm not one of "Those People "
load next

You do not have permission to post in this thread.