-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Feedback: New free language colour picker #4903
Comments
This is awesome! I love how the blue is completely saturated... How hard do you think it'd be to grey, make black, or make white areas that are unavailable? I could try and implement that in a couple weeks (when I'll have more time) if it sounds like something that would be possible. |
Oh it's possible, just incredibly time consuming as you'd need to iterate over every colour and perform the check in order to determine if the colour is free or not. This is the approach taken in https://github.com/PMunch/colourfinder and the one I initially started with, albeit in Ruby and in a slightly different form, in this project but found it too time consuming and it would require maintenance and some form of state retention and updating as the used colours change. The current approach relies solely on the If you've got an idea of how to do this efficiently, go for it. |
I like how GitHub's designers have managed to redesign the entire website, yet still haven't reached a consensus as to whether or not colour proximity is even relevant anymore... #priorities
I recommend generating a list of unavailable colours ahead-of-time, and configuring a webhook to regenerate the list each time a change is pushed to Linguist (I'm assuming that's possible using GitHub Actions, or what-have-you 😉). The list needn't be anything fancier than a binary file containing raw RGB values; you'd load it using something like: const unavailableColours = new Set();
fetch("https://lildude.github.io/linguist-free-colours/unavailable")
.then(response => response.arrayBuffer())
.then(fileData => {
fileData = new Uint8Array(fileData);
for(let i = 0; i < fileData.length;
unavailableColours.add(
fileData[i++] << 16 |
fileData[i++] << 8 |
fileData[i++]
));
}); |
This issue has been automatically marked as stale because it has not had activity in a long time. If this issue is still relevant and should remain open, please reply with a short explanation (e.g. "I have checked the code and this issue is still relevant because ___."). Thank you for your contributions. |
@lildude I think this can be closed? |
Awh, but I was just about to offer feedback. 😭 |
You still can 😁 |
My feedback is that the colour proximity requirement needs to leave the hall. 😁 |
For a very long time now, picking a free colour has been a right pain in the 🍑 and I've been mulling various methods of easing this in one form or another.
Comments yesterday in #4900 and #4894 and a bit of free time on my hands renewed my interest, so I dug into various different methods, and finally came up with a simple HTML web page and a little bit of Javascript (⚠️ my Javascript knowledge is terrible) and built: GitHub Linguist Free Colour Picker.
Use your cursor or enter the hex manually, and it'll highlight the box at the bottom to show you how it'll look and also validate if the colour is free or not.
For example,
#fdff3c
isn't available:... but
#ce00cd
is:Have a tinker with it, lemme know what you think, and feel free to open issues and submit PRs in the repo https://github.com/lildude/linguist-free-colours
The text was updated successfully, but these errors were encountered: