-
Notifications
You must be signed in to change notification settings - Fork 6
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
Update code to not get images from placeholder.com #51
Conversation
I'm tempted to immediately update this script to create local 20x20 images and not rely on external providers. |
The script to create those images is trivial: from PIL import Image
width, height = 20, 20
def hex_to_rgb(hex_string):
hex_string = hex_string.lstrip("#")
r = int(hex_string[0:2], 16)
g = int(hex_string[2:4], 16)
b = int(hex_string[4:6], 16)
return (r, g, b)
hex_color = "#ccff44"
rgb_color = hex_to_rgb(hex_color)
image = Image.new("RGB", (width, height), rgb_color)
image.save("colored_image.png") |
0a35b87
to
0d87f5a
Compare
Ok, let's try with local png, it seem to work. I also thought of using just a |
Rendering won't work in the PR, you have to look at the fork: https://github.com/Carreau/accessible-pygments/tree/rr/a11y_pygments/a11y_high_contrast_dark Also strangely the contrast is not the same, but the colors have not changes. ~~@gabalafou any idea why ? ~~ (never mind) |
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.
This is awesome! thanks @Carreau!
I left a few suggestions but none of them need be blocking
It has been bought by a new company and images might not hold forever. Use local pngs to do that. Fixes Quansight-Labs#44
Should have addressed the comments and rebase/squashed to avoid having large intermediate commits. |
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.
This looks great, thanks for updating!
It's kinda neat that we can see how many colors are used across all the themes just by looking at the assets folder.
It has been bought by a new company and images might not hold
forever. Use local pngs to do that.
Fixes #44