Comments (6)
Hello @jonasjacek,
I've just encountered this problem myself. I've spent the best part of a day on it and have come to the conclusion that there aren't any definitive names for the ANSI256 colour palette. There's lots of confusion between the X11 colour scheme and ANSI256. The first link you've given is for X11 (values from /usr/bin/showrgb from file /usr/share/X11/rgb.txt) and so it doesn't help. The last link claims to be for xterm but again it too is actually for X11. The closest is the second link but as I discovered, and as pointed out by @nhooyr, it contains lots of duplicate names and so is useless as a definitive palette description.
This figure,
https://upload.wikimedia.org/wikipedia/commons/1/15/Xterm_256color_chart.svg
appears to be a true and complete ANSI256 colour chart. It only provides index number and RGB hex values. There are no names. I think in my code I'm just going to scrap the names and stick to addressing by index value and RGB. Shame really as names are intuitive.
If anyone does come up with a unique list of names for ANSI256 please do let me know!
Steve.
from colors.
Hi @nhooyr,
thank you for getting back to me with your question. I have compiled the list by hand a couple of years ago. It took me a while and I cannot completely remember how I did it.
I was able to find the DeepSkyBlue versions in several other references, so I assume my listing is correct.
See:
http://www.graphviz.org/doc/info/colors.html
http://vim.wikia.com/wiki/Xterm256_color_names_for_console_Vim
On the other hand, there are references, where the RGB codes do not match my HEX codes: http://bradbury.org/jim/xtermcolors.html
I do not know who is right or wrong. I think I have to look into this again, when I have more time on my hands. For now, I cannot help. However, thank you for taking the time to report this!
from colors.
@tweekmonster showed me this script that gives the RGB colors for the terminal index.
It is also documented at https://en.wikipedia.org/wiki/ANSI_escape_code#Colors
from colors.
Hmm I noticed there are some duplicates, e.g. DeepSkyBlue4 is in the table 3 times. How should I differentiate between the three? DeepSkyBlue4_1 or DeepSkyBlue41. Any ideas?
from colors.
I submitted a pull that removes all duplicate color names:
#4
It's not based on any format spec or anything. I just wrote a script to find the dupes and edited them all by hand to a reasonable new name.
from colors.
@bdw429s thank you for your effort. I am unsure if merging your pull is useful. I am of the opinion that there should be multiple different versions of the color cheat sheet in this repository. See comment above: #1 (comment)).
I am afraid new color names will only add to the confusion instead of bringing clariry.
from colors.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from colors.