LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-26-2011, 06:03 PM   #1
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
display colour values for terminal supported colours


I have been trying to customise urxvt's colour scheme in ~/.Xresources. I have been struggling with one of the colours (ie. #ad7fa8). It won't get displayed. I figured out that it must be unsupported as by default urxvt supports only 88 colours. It's not a big problem as I used this little piece of code to display supported colours in urxvt:

Code:
(x=`tput op` y=`printf %80s`;for i in {0..256};do o=00$i;echo -e ${o:${#o}-3:3} `tput setaf $i;tput setab $i`${y// /=}$x;done)
The only way of getting the colour values I can think of would be to take a screenshot of the output, open it in gimp and sample particular colours. Is there a way to automatically display the values in the terminal (eg. possibly to modify the above snippet)?

Thank you.

edit: I am aware of the patch to enable 256 colours in urxvt. It is AN option, but I don't think I need 256 colours I'll make do with the ones that are supported by default.

Last edited by sycamorex; 08-26-2011 at 06:35 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Terminal colours and locale mlpa Slackware 5 09-10-2010 08:40 AM
What terminal or shell colours do you use? jayeola Linux - General 2 08-24-2010 07:16 AM
What do the colours mean in the terminal? alaskazimm Mandriva 2 07-04-2004 07:34 AM
No .bashrc, I need colours in the terminal!! akudewan Slackware 9 06-07-2004 04:16 PM
How do I get colours in terminal (aterm)? mr-tiddles Linux - General 5 10-23-2003 10:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration