Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / How to get the current ink color?

Author
Message
Xlaydos
20
Years of Service
User Offline
Joined: 26th Mar 2004
Location:
Posted: 24th Mar 2005 05:19
How do you get the current ink color in RGB?
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 24th Mar 2005 06:15
Everytime you change it save the last setting to a variable/array.

Underworld 1020
20
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 24th Mar 2005 06:46 Edited at: 24th Mar 2005 06:47
That would work, but I have a question too. Let's say there was a certain pixel on the screen and it had an ink color of like 120, not in RGB form. How would you get the RGB value of that pixel? The reason I'm asking is because I would like to make like a "Tint" function where you could manipulate the colors of certain images or even the whole screen. So, how would you go about that, getting the RGB value of a number like 120?

Monsieur Mort
19
Years of Service
User Offline
Joined: 12th Feb 2005
Location:
Posted: 24th Mar 2005 07:53
As I understand it the point command, which you'd use to find out the colour of a pixel, always gives out an rgb color, so you'd just say

color=point(x,y)

If you want the red component you use

color=rgbr(point(x,y))

and similarly use rgbg() and rgbb() for green and blue components

Why do you sink I ave zees outRAGEOUS accente?!
Underworld 1020
20
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 24th Mar 2005 23:40
I've never noticed those commands before, thanks .

Xlaydos
20
Years of Service
User Offline
Joined: 26th Mar 2004
Location:
Posted: 25th Mar 2005 00:25
Okay thanks

Login to post a reply

Server time is: 2024-09-23 15:41:23
Your offset time is: 2024-09-23 15:41:23