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 / 2 newb questions re color pls

Author
Message
owlman
15
Years of Service
User Offline
Joined: 8th Apr 2009
Location: Italy
Posted: 23rd May 2010 02:42
hi, I wanted to ask 2 questions about color that I have ..

1, what does a number like 42566773 have to do with color and what are its componant parts? I guess it's connected to rgb in some way but I cant find any inf about it and after time examining such numbers I'm no wiser now than before.

2, when I create a primitive object and try to apply a color to it, the color never shows. I create the object and then color it .. what else do I need to do? ..

thanks .. )

if effort>reward : gosub home : endif
Spectre 117
14
Years of Service
User Offline
Joined: 18th Apr 2010
Location: *Insert cheesy location here*
Posted: 23rd May 2010 05:00 Edited at: 23rd May 2010 05:05
well with out seeing your code I can't know exactly what your problem is. So, try this


by the way if you are using a wait key command that could be causing your problem. If I remember correctly the system has to sync twice before all the data is displayed on the screen. Hope this helps.
Also, I have no idea what that number means. It may be the limit of an integer in DBpro
owlman
15
Years of Service
User Offline
Joined: 8th Apr 2009
Location: Italy
Posted: 23rd May 2010 10:59
hi Spectre, thanks for taking the trouble to reply. I'm having problems using the color object command as part of a larger procedural scene I am trying to compose. Isolated and alone such as in your example color object works fine -

if effort>reward : gosub home : endif
dcpyatt
14
Years of Service
User Offline
Joined: 17th May 2010
Location: Alliance, Ohio USA
Posted: 26th May 2010 23:02
That number is too large to represent a color in RGB...

16777215 base 10 = FF FF FF hex = 255 255 255 = white
16711680 base 10 = FF 00 00 hex = 255 0 0 = red
65280 base 10 = 00 FF 00 hex = 0 255 0 = green
255 base 10 = 00 00 FF hex = 0 0 255 = blue

DaveP in Ohio, USA
owlman
15
Years of Service
User Offline
Joined: 8th Apr 2009
Location: Italy
Posted: 28th May 2010 23:35
@dcpyatt .. thanks I get it now .. dec forms of hex values of rgb colors. not easy for me - but very useful. gotta get my head round it.

if effort>reward : gosub home : endif
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 30th May 2010 16:44
You can also just use the RGB function to get those numbers automatically.

Login to post a reply

Server time is: 2024-09-28 18:17:46
Your offset time is: 2024-09-28 18:17:46