erg
Posts: 7
Joined: Thu Oct 25, 2018 5:41 pm

invert screen colors?

Thu Oct 25, 2018 5:48 pm

Hi all,

Is it possible to invert screen colors in Raspbian at all?

I've tried 'xcalib -i -a' but no joy. I've the libxxf86vm-dev package which seems necessary for xcalib to work installed, btw

Is there a way?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 21679
Joined: Sat Jul 30, 2011 7:41 pm

Re: invert screen colors?

Thu Oct 25, 2018 6:59 pm

Bizarrely I was working on this in the firmware only today. I'm planning to add gamma correction (which you can use to invert) and colour correction matrix correction to the firmware over the next week. Takes a bit longer to get it out to the public.

This is on the entire output, not selective at all.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

erg
Posts: 7
Joined: Thu Oct 25, 2018 5:41 pm

Re: invert screen colors?

Thu Oct 25, 2018 8:11 pm

Awesome. Can't wait. It does come handy, I'm keeping fingers crossed, I guess, that much I can do to help ...

erg
Posts: 7
Joined: Thu Oct 25, 2018 5:41 pm

Re: invert screen colors?

Fri Dec 07, 2018 8:14 am

jamesh:
Is there any progress on that? Are we going to see this feature anytime soon? Could you be so kind and let know on this forum if and when this is released and how to use it?
Regards,
erg

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 21679
Joined: Sat Jul 30, 2011 7:41 pm

Re: invert screen colors?

Fri Dec 07, 2018 10:20 am

Hmm, forgotten about that one. Thought it had been merged. Will check.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 21679
Joined: Sat Jul 30, 2011 7:41 pm

Re: invert screen colors?

Fri Dec 07, 2018 11:33 am

OK, not merged yet. Might have to make a couple of small changes to get through code review.

There will be a palette function (mapping RGB->RGB which you can use to invert) and also the ability to set a colour correction matrix.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 21679
Joined: Sat Jul 30, 2011 7:41 pm

Re: invert screen colors?

Fri Dec 07, 2018 1:43 pm

jamesh wrote:
Fri Dec 07, 2018 11:33 am
OK, not merged yet. Might have to make a couple of small changes to get through code review.

There will be a palette function (mapping RGB->RGB which you can use to invert) and also the ability to set a colour correction matrix.
Note, CCM is done via config.txt, palette requires sending data to a mailbox - see here https://github.com/JamesH65/setgamma/bl ... setgamma.c
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

dandock
Posts: 1
Joined: Tue Feb 19, 2019 3:52 am

Re: invert screen colors?

Tue Feb 19, 2019 3:54 am

Is this something I can test now? Being able to invert colors with the pi itself will help me avoid a hardware solution!

Thanks!

tvjon
Posts: 680
Joined: Mon Jan 07, 2013 9:11 am

Re: invert screen colors?

Thu Feb 21, 2019 9:22 am

Yes, it actually looks rather useful.

For example if you need something on screen to attract your attention, just do

$ sudo ./setgamma -l 7 -d 1000 -c 3

There are several

mailbox.h

files around in rpi land, but you need the one jamesh supplies, so just go to:

https://github.com/JamesH65/setgamma

where you'll find the relevant files along with instructions.

HTH

tvjon
Posts: 680
Joined: Mon Jan 07, 2013 9:11 am

Re: invert screen colors?

Thu Feb 21, 2019 11:56 am

I've added an extra argument now for the display number, & even more usefully, it works fine on the Foundation TFT display, & anything connected via the DPI interface as well as HDMI/composite.

I don't own a Foundation display any longer, but usefully a friend lent me his display recently for a particular job. It has a 3A rpi board attached, along with a 4.14 kernel Raspbian.

Initially, it failed running setgamma, with an IOCTL error. Friend's µSD card needed updating anyway, & after:

sudo BRANCH=next rpi-update

setgamma works fine on his TFT.


Thank you James!

Return to “Raspbian”