Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in process sentinel: forge--color-brightness: Color doesn’t have #NNNNNN format #170

Closed
davep opened this issue Jul 11, 2019 · 15 comments

Comments

2 participants
@davep
Copy link

commented Jul 11, 2019

This seems to have started coinciding with forge updating to forge-20190708.2203 for me. If I forge-pull I get the following error message showing:

forge--color-brightness: Color doesn’t have #NNNNNN format

I modified forge--color-brightness to report the colour it wasn't happy with when throwing the error and, in this case, it's a colour value of "#666".

I'm running against a locally-hosted GitLab and there is such a label colour:

image

@tarsius

This comment has been minimized.

Copy link
Member

commented Jul 11, 2019

What is the six digit representation of #666? #606060?

@davep

This comment has been minimized.

Copy link
Author

commented Jul 11, 2019

I believe so, yes. It's one of the valid formats listed here: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#RGB_colors

@tarsius

This comment has been minimized.

Copy link
Member

commented Jul 11, 2019

According to that page it is the same as #666666.

@davep

This comment has been minimized.

Copy link
Author

commented Jul 11, 2019

Yes, sorry, misread the above. The latter is correct.

@tarsius tarsius added the bug label Jul 11, 2019

@tarsius tarsius closed this in dcd9524 Jul 11, 2019

@tarsius

This comment has been minimized.

Copy link
Member

commented Jul 11, 2019

That should do it.

@davep

This comment has been minimized.

Copy link
Author

commented Jul 11, 2019

Thanks, I'll give it a test very soon.

(error "Color does not have #RRGGBB or #RGB format")

It might be worth noting, from the above link, that something like #6666 is also valid (as is #66666666). For example:

image
image
image

Etc...

@tarsius

This comment has been minimized.

Copy link
Member

commented Jul 11, 2019

Emacs has some code to determine whether to use the dark or light face definition and given that this is getting more complicated than I originally thought it would probably be better to locate and reuse that than to re-implement it. Maybe you could help me locate it?

@davep

This comment has been minimized.

Copy link
Author

commented Jul 11, 2019

I don't know of the feature you mention, but if I get some time I'd be happy to have a dig around (which will likely mean trying to better understand what forge is doing here too). Might be a few days I'm afraid as I've got quite a lot on at the moment.

@davep

This comment has been minimized.

Copy link
Author

commented Jul 11, 2019

Would it be helpful for me to open this as a new issue (that way it should serve as a reminder to me that I need to take a look)?

@tarsius

This comment has been minimized.

Copy link
Member

commented Jul 11, 2019

I don't know of the feature you mention

Depending on (set-face-foreground 'default THIS) Emacs uses the light or the dark theme. The code that makes that decision based on THIS, might be suitable for our need too, provided it can be called from lisp.

Would it be helpful for me to open this as a new issue

No, but I'll reopen this one if that helps you.

@davep

This comment has been minimized.

Copy link
Author

commented Jul 11, 2019

@tarsius tarsius reopened this Jul 11, 2019

@davep

This comment has been minimized.

Copy link
Author

commented Jul 13, 2019

I've had a brief look and, sadly, it's confirmed that I'm far too ignorant of how faces and fonts and the like work in Emacs to be any help here. Sorry.

@tarsius

This comment has been minimized.

Copy link
Member

commented Jul 13, 2019

I had a look too yesterday and it looks like Emacs doesn't provide any rgba support. I am inclined to simply discard that information and assume full opacity.

@davep

This comment has been minimized.

Copy link
Author

commented Jul 13, 2019

Seems like a fair approach to me; as long as it doesn't throw an error over the other two forms that could be used and just uses the RGB/RRGGBB information I'd imagine that'd work well in most/all cases.

@tarsius

This comment has been minimized.

Copy link
Member

commented Jul 14, 2019

The alpha channel is now simply discarded and if the color is completely unrecognized, then black is used instead of raising an error.

@tarsius tarsius closed this Jul 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.