Color Table

CK CK 3788 
Created at  
370 0 0
Here,JavaScript helps you manipulate the background of the document.
Either choose the color you want by its name,or create a unique color
by using the " " and "-" with the Red-Green-Blue buttons. A really neat
effect.

<!-- TWO STEPS TO INSTALL COLOR TABLE:

   1.  Paste the designated script into the HEAD of your HTML document
   2.  Add the code into the BODY of your HTML document  -->
         
<!-- STEP ONE:  Paste this script into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function changeBackground(hexNumber) {
document.bgColor=hexNumber
}
prefix="#"
rnum1=0
bnum1=0
gnum1=0
rnum2=0
bnum2=0
gnum2=0
hexNumber2="#000000";
rcount=0;
bcount=0;
gcount=0;
function num2hex(num) {
if (num==15) return "f";
else if (num==14) return "e";
else if (num==13) return "d";
else if (num==12) return "c";
else if (num==11) return "b";
else if (num==10) return "a";
else if (num==9) return "9";
else if (num==8) return "8";
else if (num==7) return "7";
else if (num==6) return "6";
else if (num==5) return "5";
else if (num==4) return "4";
else if (num==3) return "3";
else if (num==2) return "2";
else if (num==1) return "1";
else return "0";
}
function changeBackground2(number) {
if(number == 1) {
rnum1=rcount%16;
if (rcount <15) {
rcount=rcount 1;
  }
}
if(number == 2) {
gnum1=gcount%16;
if (gcount <15) {
gcount=gcount 1;
  }
}
if(number == 3) {
bnum1=bcount%16;
if (bcount <15) {
bcount=bcount 1;
  }
}
if(number == 4) {
rnum1=rcount%16;
if (rcount > 0) {
rcount=rcount-1;
  }
}
if(number == 5) {
gnum1=gcount%16;
if (gcount > 0) {
gcount=gcount-1;
  }
}
if(number == 6) {
bnum1=bcount%16;
if (bcount > 0) {
bcount=bcount-1;
  }
 }
hexNumber2 = prefix num2hex(rnum1) num2hex(rnum2) num2hex(gnum1) num2hex(gnum2) num2hex(bnum1) num2hex(bnum2);
  document.bgColor=hexNumber2
}
// End -->
</SCRIPT>

<!-- STEP TWO:  Add this code to the BODY of your HTML document  -->

<BODY>

<CENTER>
<FORM METHOD="POST" NAME="background">
<TABLE WIDTH=350 BORDER="3" CELLPADDING="3">
<TR>
<TD Align=center><INPUT TYPE="button" VALUE="Red" ONCLICK="changeBackground('#FF0000')"></TD>
<TD Align=center><INPUT TYPE="button" VALUE="Green" ONCLICK="changeBackground('#00FF00')"></TD>
<TD Align=center><INPUT TYPE="button" VALUE="Blue" ONCLICK="changeBackground('#0000FF')"></TD>
<TD Align=center><INPUT TYPE="button" VALUE="White" ONCLICK="changeBackground('#FFFFFF')"></TD>
<TD Align=center><INPUT TYPE="button" VALUE="Black" ONCLICK="changeBackground('#000000')"></TD>
<TD Align=center><INPUT TYPE="button" VALUE="Grey" ONCLICK="changeBackground('#C0C0C0')"></TD>
</TR>
</TABLE>
<TABLE WIDTH=350 BORDER="3" CELLPADDING="3">
<TR><TD><center>Variable Background Color Changer</center></TD>
</TR>
</TABLE>
<TABLE WIDTH=350 BORDER="3" CELLPADDING="3">
<TR>
<TD Align=center><INPUT TYPE="button" VALUE="  Red" ONCLICK="changeBackground2(1)"><P>
<INPUT TYPE="button" VALUE="- Red" ONCLICK="changeBackground2(4)"></TD>
<TD Align=center><INPUT TYPE="button" VALUE="  Green" ONCLICK="changeBackground2(2)"><P>
<INPUT TYPE="button" VALUE="- Green" ONCLICK="changeBackground2(5)"></TD>
<TD Align=center><INPUT TYPE="button" VALUE="  Blue" ONCLICK="changeBackground2(3)"><P>
<INPUT TYPE="button" VALUE="- Blue" ONCLICK="changeBackground2(6)"></TD>
</TR>
</TABLE>
<TABLE WIDTH=350 BORDER="3" CELLPADDING="3">
<TR>
<TD><center>Keep pressing buttons to change color<BR>
(The color will start as black)</center></TD>
</TR>
</TABLE>
</FORM>
</CENTER>
<p><center>
<font face="arial,helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size:  3.44 KB  -->

Tags HTML Javascript onmouseover Facebook X
Comments 0
Similar posts
  1. Cursor Changer
    387
  2. Dual Scroller
    335
  3. Enlarge Image
    517
  4. Confirm The Link Clicked
    632
  5. New Window
    613
  6. How to display message on browser status bar ?
    481
  7. Pop Up Window On Top
    523
  8. How To Close A Pop-up Window ?
    449
  9. Remove the spaces before begin and after end of text
    342
  10. Code To Clear Browser History
    378
  11. Add This Page To Favorites
    406
  12. Select And Deselect All Checkboxes By Javascript
    634
  13. Javascript Mouse Event Handler Example
    404
  14. Getting WebSearchers On Your Site
    378
  15. Hiding HTML on the browser
    468
  16. How to get date time in Javascript ?
    502
  17. Javascript based Alarm Clock
    679
  18. Javascript implemented Calendar
    425
  19. Basic Date Display
    518
  20. Add A Scrolling Status Bar Text To Your Site
    411
  21. Button That Will Show The Page's Source
    390
  22. Button That Will Close The Browser Window
    353
  23. Icon Coupled Url
    429
  24. Book Mark This Site
    409
  25. Document Fader
    347
  26. Tooltip
    409
  27. Add Message On Mouse Traling
    2,565
  28. Number Of Vists
    518
  29. How to calculate page loading time ?
    360
  30. Move window
    551
  1. How to know browser version in javascript ?
    449
  2. How to know the browser name in Javascript ?
    641
  3. Select All, None, Invert checkbox
    509
  4. Simple RSS Reader based on javascript
    503
  5. How to find the ip address of a client machine from a web application?
    518
  6. Put Date Time on HTML
    553
  7. IFRAME Auto Resize in IE, FireFox by Javascript
    460
  8. How to elimiate the "Restore Previous Session" dialog when FireFox 2.0 starts
    411
  9. How to include Javascript from anonther ?
    414
  10. Javascript based Browser Sniffing
    436
  11. Javascript based Regular Expression Tester
    377
  12. Two useful string functions - substr & substring
    413
  13. How to block a connection from the certain site ?
    356
  14. Is there URLEncode function in Javascript ?
    395
  15. Firefox Web Tweaking
    381
  16. Send An Email Using A Bean
    1,020
  17. jQuery and Function Chaining
    540
  18. Address Book
    580
  19. Displays the number of pages that the users browser has displayed in its session
    670
  20. Greeting For The Time Of Day
    395
  21. Access Granted
    593
  22. Cookie enabled browser checking in Javascript
    344
  23. Cookie Redirect
    505
  24. New content notifier in Javascript
    606
  25. Let popup once for event dialog or something like that in Javascript
    428
  26. Save And Restore Form Cookies in Javascript
    339
  27. How to record visitor's name by Cookie
    414
  28. Javascript & Cookie based Visitor Application
    439
  29. Cross Browser Event Management Functions Using JavaScript
    611
  30. Printing A Page
    383
Recently updated
  1. Google OAuth Token Expiration: Causes and Solutions
    29
  2. Why 100% SEO Guarantees Better User Engagement and How to Achieve It in Your Service
    55
  3. Why SPF and DKIM Are Essential for Linux Email Servers?
    49
  4. How do I create animated background for Google Meet?
    22,850
  5. MaxMind GeoLite2 vs. DB-IP Lite vs. ip-api.com: Choosing the Right Free IP Geolocation Solution
    271
  6. Meet Valkey: Why Redis Changed Its License, Why Valkey is Better, and How to Use It as a Drop-in Replacement
    103
  7. How Rogue Web Scrapers Are Stealing My Content and Destroying My Server
    168
  8. Array of arguments passed to script in PHP
    97
  9. Invalid Auction Storms in Ad Tech
    106
  10. Building MRC-Compliant Instrumentation in Ad Tech: Implementation Steps and Key Challenges
    207
  11. The Two Clocks of Ad Server Architecture
    77
  12. Frequency Cap Architecture Overview
    526
  13. Collecting Proof-of-Play from 100,000 Screens
    152
  14. Vector Search in Relational Databases (RDBs): Trends & Usage Environments
    302
  15. What is RedisVL?
    114
  16. Designing a Skill Registry Architecture: Minimize Token Usage and Maximize AI Performance
    246
  17. TPU & GPU Cluster Management Tools
    257
  18. The Concept of Scaffolding in AI Agents
    244
  19. Beyond Static Pipelines: Architecting LLM Multi-Agent Systems for Autonomous Workflow Orchestration
    596
  20. AI-DLC vs. AI-SDLC: Model-Centric vs. System-Centric AI Development
    267
  21. Fine-Tuning Open-Weight LLMs: Training, Licensing, and Deploying Custom Models with Ollama
    353
  22. Inside the Next-Generation Streaming Architecture: Ultra-Low Latency, SGAI, and AI Codecs
    206
  23. Machine Learning: Training vs. Ranking
    229
  24. The Continuous Learning Machine: Designing a Loop That Actually Turns
    228
  25. The Next-Gen Low-Latency Standards: LL-HLS & MoQ
    202
  26. Designing a Data Curation System Around a Vector Database
    230
  27. Extracting Context from Live Video: The Architecture Got Simpler When We Stopped Building Features
    263
  28. The New Ad Stack Behind Live Sports Streaming: Inside SGAI, EABN, and the Standards Race to Fix Live Monetization
    671
  29. Designing MLOps Architectures to Handle Seasonal Data Drift in EV Fleet Models
    200
  30. From 15 to 40+ FPS: Accelerating PyTorch Object Detection on Automotive ECUs
    232