Skip to content

Improve color print logic#839

Merged
sabrogden merged 1 commit intosabrogden:masterfrom
dcog989:improve-color-display-logic
Apr 26, 2025
Merged

Improve color print logic#839
sabrogden merged 1 commit intosabrogden:masterfrom
dcog989:improve-color-display-logic

Conversation

@dcog989
Copy link
Copy Markdown
Contributor

@dcog989 dcog989 commented Apr 25, 2025

Catch missing (e.g. hsl(123 23% 34%)), remove false catches (e.g. '112233').

Refactored, help classes.

@dcog989
Copy link
Copy Markdown
Contributor Author

dcog989 commented Apr 25, 2025

FYI - matching on valid-colors.txt

@sabrogden sabrogden merged commit d77df16 into sabrogden:master Apr 26, 2025
sabrogden added a commit that referenced this pull request Apr 27, 2025
sabrogden added a commit that referenced this pull request Apr 27, 2025
@sabrogden
Copy link
Copy Markdown
Owner

fixed build errors and a few cases from your colors.txt that were not working, please verify, #841

@dcog989
Copy link
Copy Markdown
Contributor Author

dcog989 commented Apr 27, 2025

Yeah, looks good. Thanks for fixing my silly mistakes (the learning curve is still vertical!).

@dcog989 dcog989 deleted the improve-color-display-logic branch April 27, 2025 09:55
@indigofairyx
Copy link
Copy Markdown

i beg if differ on this valid-colors.txt list

checkout the screenshots, the ditto version are there as well

v3.24.317.0
image

vs

v3.25.57.0
image

with colors...

36F301
#36F301
255, 0, 0
112233
  1. the new color tiles are too small
  2. forcing prefixes breaks the color tiles. ...

... there are many code langs and settings doc that don't require a prefixes or even add their.

AHK is good example, it uses hex, but not #112233. it can handle 0x112233 in some places - not all, and everywhere else they use their own prefix of c112233

and\or other code docs, an xml here, don't use the RGB() prefixes <element id="Menu.DropDownCheckBoxImage" fg="0, 255, 0" />

@sabrogden
Copy link
Copy Markdown
Owner

@dcog989
Copy link
Copy Markdown
Contributor Author

dcog989 commented Jun 4, 2025

https://www.w3.org/TR/css-color-4/#color-syntax

So 112233 is not a hex color - it's just numbers. So, do we confuse users who are not developers and will be puzzled to see a color block next to some number they copied?

XML ... fg="0, 255, 0"

Same as before - that's not RGB. How can you match for every permutation of RGB / HSL / etc. without their prefix?

@indigofairyx
Copy link
Copy Markdown

Going back to this issue \ feature request. Which u implemented previously. #722

This change has broken it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants