Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to work with the return value of grabc. If it returns #000000 then I want to take it to a=#000000. But this outputs the value in terminal. So How can I do this?

[N.B: grabc is a tool for finding out the RGB value at mouse click. Use sudo apt-get install grabc]

share|improve this question
You probably want something like this:… – Jason Conti Oct 7 '13 at 17:21
This question appears to be off-topic because it is a programming question and not specific to Ubuntu. – Nathan Osman Oct 8 '13 at 2:27
grabc is at least linux-specific, it could be answered in a platform agnostic way, but it could also exist some way of doing the same thing (recover the RGB value at mouse click) that is Ubuntu specific. On-topic to me. – Javier Rivera Oct 8 '13 at 7:03

I managed to find the answer. I thought I should share this,

import os




print "a="+s

This gave me the desired result.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.