Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Generating 256 color choices
Message
From
06/04/2002 22:36:25
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00605952
Message ID:
00641895
Views:
22
>The code in the message generates HTML table with 16 columns and 17 rows. Your code generates table with 8 columns and 28 rows. 6 rows are missing.

Yes, I thought it would have been easier to follow from the original code that was given. Here is what I use:
lcHtml=lcHtml+'<TABLE CELLSPACING=0 CELLPADDING=0 ID=ToCenter><TR>'
lnPerRow = 8
Store 255/(2^3-1) to lnRedInc, lnGreenInc
lnBlueInc = 255/(2^2-1)
lnShp=0
For blue = 0 to 2^2-1
   For green = 0 to 2^3-1
      For red = 0 to 2^3-1
         lnShp  = lnShp+1
         lnRed = round(red * lnRedInc,0)
         lnGreen = round(green * lnGreenInc,0)
         lnBlue = round(blue * lnBlueInc,0)
         lcWebColor = right(trans(rgb(lnBlue,lnGreen,lnRed),'@0'),6)  
         lcHtml=lcHtml+iif((lnShp-1)%lnPerRow=0,'<TR>','')+;
          '<TD bgcolor=#'+lcWebColor'">...'
      Endfor
   Endfor
Endfor
lcHtml=lcHtml+'</TABLE>'
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform