On Mon, 11 Aug 2003, Eric Wong wrote:
> Is there a way to invert _all_ colors displayed on an X server or at
> least everything on the normal[1] X11 (minus special layers like OpenGL
> and xv) display?
>
> I could write a script that does bitwise inverts on everything in my
> rgb.txt, but I'm sure enough apps/toolkits specify colors directly in
> RGB values to make it pointless. Images wouldn't be affected by the RGB
> change, either.
>
> Preferably, it would be possible to invert back-and-forth while the X
> server is running, maybe through an app along the lines of xgamma.
> I'd also prefer that it be done by the X server itself and not specific
> to a certain video card driver.
>
> If an existing method doesn't exist, could someone point me to where I
> should look in the X source and make the necessary changes? Thanks.
>
> Why I want this:
>
> I use X apps from a variety of GUI toolkits, and would rather just
> invert everything at the X server level than to configure them
> individually. There are also some colors hardcoded in apps; not to
> mention annoying web designers who make the outlines of images white
> since they assume everyone has a white background on their browser.
You probably want to play with XF86VidModeSetGammaRamp in the
x86VidMode extension. See /usr/include/X11/extensions/xf86vmode.h.
You can set an inverse ramp: light maps to dark, dark to light.
Get the size of the array with XF86VidModeGetGammaRampSize then
load a gamma corrected lookup table of that size with
XF86VidModeSetGammaRamp. This might not change the video overlay
or the cursor on alot of the hardware, but should change everything
else. The array elements go from 0 (full dark) to 65535 (full
intensity).
Mark.
_______________________________________________
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86