-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Fix #2550 - Make it easier to find Colour names #2559
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool work on the color swatches page, that's great!
I think it would be best to keep color.rst more similar to how it was, with the named color being one of the possible color formats under Supported color_value formats like every other format.
That being said, you could replace the link to the colordict source code with the link to your color swatches page.
I think it would also be nice to have a link to the color swatches page in the colordict source code and vice versa, so that any future editors to those files remember the existence of the other.
Also: the mystery in this PR is why the new page doesn't show up in the pygame documentation top of the page header, because new files are added to that automatically... Something in the format?
Note to anyone building the documentation (illume) This page seems to need sphinx 3 and up to date docutils (more than other pages), although I haven't tested it intensively.
Tweaked slightly to (hopefully) make it show up in the right spot in the top-of-page docs. Also sorted gray and grey properly.
|
Ah, sorry I was unclear. I was happy that this doesn't show up in the top bar, I just wondered why. Since I've dabbled in hiding modules before, like in #2511. I'd also like to have the link to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! Hopefully this will be helpful to people.
|
On second look, I see some colors are incorrect. For example all the golds are just black, same as all the darkoranges, and the greens, for example. |
That's extremely weird, since Python wrote most of the file; I'll look into it though! Which browser are you using? Looks like a bunch of things are showing up black ( |
|
I'm using Chrome, but I don't think it would matter? The one's that I'm talking about, on examination of the rst file, only have |
|
The issue was incorrectly translating colours with values less than 16 in one or more components; a lot of colours were affected. I inspected the entire rendered page and everything looks good now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fun :) Thanks.
This makes it easier (hopefully) to find
pygame.Color()'s ability to use named colours, and also provides a page listing each, with a sample colour swatch.Tested with Sphinx 3.5.3 and Firefox 87.0.
This addresses #2550.