Jump to content

Bug: Added colors under text color palette not working


Recommended Posts

On the post toolbar, I see that the new colors are now showing up. However, this has broken the functionality of the color picker. (Chrome Version 109.0.5414.120)

If you try to change the color of text by defining a new text color (such as a hex-defined one like this color), nothing changes. However, the color shows up in the dropdown menu (see pic). If you check the source, the span becomes this:

<span style="color:rgb(var(--mwpalette-undefined));">

Color in menu:

spacer.png

Link to comment
Share on other sites

  • 2 weeks later...

Diagnosis: Invision's customized version of the color pickers does not play nicely with CSS class-defined color styles, which are required to support theme-aware color palettes.

Further detail: Unrelated to the issues with the picker not consistently handling class-defined styles, the More Colors panel is full of colors that do not play nicely across light and dark themes.

 

Ultimately, our goal is to provide a wide variety of colors while making sure all users can read them on any theme. The solution therefore looks something like this:

  1. Fork the colorbutton plugin; fix the recently chosen colors bug.
  2. Find some number of additional colors that meet the criteria for readability in light and dark themes; add them to the palette.
  3. Remove the More Colors dialog. Arbitrary colors can still be chosen from Source mode.
Link to comment
Share on other sites

2 hours ago, Eric said:

Remove the More Colors dialog. Arbitrary colors can still be chosen from Source mode.

I understand your desire to guide people toward "user-friendly" colors, but I'd appreciate if the More Colors option wasn't removed. I use custom colors for the sake of uniqueness, and adding extra steps to every time I want to use said color is decidedly not user-friendly.

I'm going to keep doing colors my way and would appreciate there not being hurdles put down (meaning changing all the colors to something quickly selectable, then grabbing the source, pasting into notepad, use a replace command to change the selected color to my color, then copying back into the source).

Link to comment
Share on other sites

The two circled parts are both confirmed not working, for roughly the same reason but with different underlying mechanical issues. Selecting any of the colors in the upper block will work fine, but if you try to "repeat" that selection using the recently selected colors below, or pick one from the more colors dialog, it fails (color changes to --mwpalette-COLORCODE).

image.png.e5785c3d9d2d5b3ba8422e35306ce8c9.png 


As for whether or not More Colors is needed or desired, my main motivation for suggesting its demise is centered around readability across themes. Users have been asking for alternate themes since MW v4 came out fifteen years ago, for a variety of reasons from garden-variety preference to workplace obfuscation to more significant ocular issues. Aside from the nigh-herculean efforts required to build themes in vBulletin 3.x, one of the reasons we didn't was that cross-theme readability was a known problem without a solution. Now the internet has the solution (in the form of Cascading Style Sheets level 3), so I'd like to encourage authors to be considerate that DarkSlateGray might be great for the MW Default theme, Beach, and Clockwork, but be practically invisible in Night, Mocha, or Dark Lime--and the converse equally true for AntiqueWhite.

I'd like to continue the discussion so we can make sure the end result is as beneficial overall for the community as possible. Please don't take my personal opinion as the end-all-be-all.

Link to comment
Share on other sites

I'd also like to continue the discussion. I'm of the mind that removing functionality is not a proper solution.

All I really need from the More Colors dialogue box is the text field where I can put in a hex value. As long as I have that ability, I'll be happy. How can we make that work, while still meeting your goals?

Link to comment
Share on other sites

4 hours ago, Malkavian Grin said:

I'd also like to continue the discussion. I'm of the mind that removing functionality is not a proper solution.

All I really need from the More Colors dialogue box is the text field where I can put in a hex value. As long as I have that ability, I'll be happy. How can we make that work, while still meeting your goals?

That is sort of what he is saying, it is not "user friendly" to any user/player of MW that is reading your post to be forced to not be able to read it because of their theme preference. Not everyone uses the theme that you do and by putting in your own color you may break the post readability for some of your players/users of the site that use a lighter or darker background.

That is why we moved to the color changing palette in the first place. I understand your desire for uniqueness, but do you expect all your players to conform to the same theme as you to be able to read your colored text? Not understanding how it helps the website as a whole since it limits some users to certain themes.

By taking away the "More Color" option we are actually helping to not break the readability of the site for all users. If you have not noticed, we have at least a dozen or so themes in a wide array of colors. So, readability (by all) is a huge issue with personally set colors.

Link to comment
Share on other sites

13 hours ago, Malkavian Grin said:

I'd also like to continue the discussion. I'm of the mind that removing functionality is not a proper solution.

All I really need from the More Colors dialogue box is the text field where I can put in a hex value. As long as I have that ability, I'll be happy. How can we make that work, while still meeting your goals?

Provided you pick a color that has a good contrast ratio against all 12 themes, then yes. The problem is I have no way of guaranteeing your selection meets that criteria for any arbitrary color in the 256^3 sRGB space with the current tools, which doesn't help you as the author exercise creative freedom without sacrificing the ability of your readers to independently enjoy your content with their own freedom of choice.

That said... past experience indicates that I seldom give up on finding a way... 🙃

spacer.png

Link to comment
Share on other sites

Could you assign colours based on theme colours. So if someone picks a colour that won't so up on specific themes, you could default the colour for them on that theme? So if you're on a light theme AntiqueWhite automatically just defaults to a base colour (like black).

It WILL mean that the original posters artistic vision might be broken for some people - who will probably never know that - but it will make sure that its always readable, while ensuring that the person creating the post sees it the way they want to. This is sort of already the case with width, its always possible to make a post that will look good on your screen but break on other peoples screen, you've done a lot to prevent that, but its always a possibility.

Link to comment
Share on other sites

@Neopopulas The main part of the color picker does that currently (still in dev a bit). The colors shift to a similar-but-theme-friendly version based on the reader’s theme.
 

Eric is likely to expand the “theme safe” color selection as well, because he initiates his own projects’ snowball effects often. 😛

Link to comment
Share on other sites

@Eric I'm sorry. I understand I'm being the vocal belligerent artiste. I truly do understand the dev perspective of wanting to make sure the site is as usable and readable for as many people as possible. (if you can't read it, why are you here, right?) My use of color is for more than just in text though; I'm now making multi-layered borders around my images using color steps that just aren't possible with the options laid out.

I am loathe to say the problem lies in the boundaries you wish to set, while giving us the ability (through Source) to use whatever we like. You can't have both, right? Either there is creative freedom, or there is a limited palette that works well for everyone (hello web-safe colors circa 1995).

I guess the main issue I have with the pre-determined palette is that there isn't enough variety. On Premium theme, I have 3 blues, 4 greens (maybe 6, hard to tell with how dark some are), 3 pinks, 2 red, ONE orange, ONE brown, etc. They are very "samey" to me. There's no goldenrod, no purples at all, etc.

I know, I know, I sound like I'm just complaining. Ultimately, as long as you don't restrict what colors I'm allowed to put into the code, I'll be okay.

Link to comment
Share on other sites

@Eric Here's a thought - if the site detects a #<hex> colour code in a post, could you perhaps do something with a bit inversion on the parts of the code if the current theme doesn't match the code that's present (ie: for light themes, favour codes at the lower end of the range for each of the colour attributes and for dark themes the opposite?) - something along the lines of:

1. Split into individual RGB values from 0x00 - 0xff
2. Take the 2's complement of each value.
3. Recombine

Not sure how much overhead this would impose on the renderer, and I guess you'd need to have an extra data point for each post to know whether it was written on a dark or light theme - so whether you'd need to invert or not, but could be a potential solution.

Link to comment
Share on other sites

54 minutes ago, Malkavian Grin said:

@Eric I'm sorry. I understand I'm being the vocal belligerent artiste. I truly do understand the dev perspective of wanting to make sure the site is as usable and readable for as many people as possible. (if you can't read it, why are you here, right?) My use of color is for more than just in text though; I'm now making multi-layered borders around my images using color steps that just aren't possible with the options laid out.

I am loathe to say the problem lies in the boundaries you wish to set, while giving us the ability (through Source) to use whatever we like. You can't have both, right? Either there is creative freedom, or there is a limited palette that works well for everyone (hello web-safe colors circa 1995).

I guess the main issue I have with the pre-determined palette is that there isn't enough variety. On Premium theme, I have 3 blues, 4 greens (maybe 6, hard to tell with how dark some are), 3 pinks, 2 red, ONE orange, ONE brown, etc. They are very "samey" to me. There's no goldenrod, no purples at all, etc.

I know, I know, I sound like I'm just complaining. Ultimately, as long as you don't restrict what colors I'm allowed to put into the code, I'll be okay.

spacer.png

I kid.. i kid... 😄

 

Link to comment
Share on other sites

×
×
  • Create New...