- ASP - Miscellaneous
·Script Writers
·Database Display
·Response Objects
·Server Variables
·Random Events
·What's New?
Mail List


Color Safe Palette or Nested For Next Loops & Arrays
The browser can do a great many things, but it has a limit of 216 colors that can “safely” (without dithering or color washout) display. Fortunately, there are many ways that you can display all the color combinations in the browser safe color palette (I do not think I have seen two places do this the same way yet). By placing the six possible values for color (00,33,66,99,CC,FF) in an array and nesting three for next statements with values one through six a table with all the color codes will neatly be displayed in a table.
View the Output
Text View
Print View
Mail this Link
Download the Code

<title> Safe Palette or Nested For Next Statments with Arrays)</title>
<body bgcolor="#FFFFFF">

<table border=1 width=500 align=center>
<caption>Web Browser Color Safe Palette</caption>
' Set up the varible color with all the values to loop through
dim color(6)

' Nest the counters
for r_counter = 1 to 6 %>
for g_counter = 1 to 6
for b_counter = 1 to 6

<td align="center" bgcolor="<% 
' Write out the value for each array for the current count to change the bgcolor 
response.write color(r_counter) & color(g_counter) & color(b_counter) %>
<font color='#FFFFFF'><b>
' Write out the value for each array for the current count to display the color code 
response.write color(r_counter) & color(g_counter) & color(b_counter) %>

next ' loop to change b_counter 


next ' loop to change g_counter
next ' loop to change r_counter





ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement is hosted by
    Donate Food Online with a Mouse Click at
    Donate Land Online with a Mouse Click at
    © 1999 - 2018
    All Rights Reserved

  • Kids jordan 6 rings
  • Jordan retro 10
  • Jordan retro 3