search
Twitter Rss Feeds
MicrosoftArticlesForumsGroups
C# .NET
VB.NET
Visual Studio .NET
ADO.NET
Xml/Xslt
VB 6.0
.NET CF
GDI+
LINQ
Deployment
Security
FoxPro
Silverlight / WPF
Entity Framework
RIA Services

Web ProgrammingArticlesForumsGroups
JavaScript
ASP
ASP.NET
Web Services

Non-MicrosoftArticlesForumsGroups
NHibernate
Perl
PHP
Ruby
Java
Linux / Unix
Apple
Open Source

DatabasesArticlesForumsGroups
SQL Server
Access
Oracle
MySQL
Other Databases

OfficeArticlesForumsGroups
Microsoft Excel
Microsoft Word
Microsoft Powerpoint
Publisher
Money

Operating SystemsArticlesForumsGroups
Windows 7
Windows Server
Windows Vista
Windows XP
Windows Update
MAC
Linux / UNIX

Server PlatformsArticlesForumsGroups
Share Point
BizTalk
Site Server
Exhange Server
IIS
Transaction Server

Graphic DesignArticlesForumsGroups
Macromedia Flash
Adobe PhotoShop
Microsoft Expression

OtherArticlesForumsGroups
Subversion / CVS
Ask Dr. Dotnetsky
Active Directory
Networking
Uninstall Virus
Job Openings
Reviews
Search Engines
Resumes

 

Robbe & Melisa Morris
Color Selection Via 510 Color Palette

By Robbe D. Morris

Printer Friendly Version

Purple keywords indicate links to related content.


This is more of a work horse example than a real technical article.  It's been placed here for your benefit.  The downloadable zip file at the bottom of the page contains the three files necessary for you to simply plug the functions into your page along with a default page to serve as the example of how to use it.   It's extremely easy.  I've also left a couple of functions for generating an array of colors and plugging them into an HTML table.  This sample of 510 colors is pretty "heavy".  You can adjust the color array function to only hold those colors desired (perhaps the JavaScript supported colors...).  The comments for the functions are in the "colorpalette.asp" file.
As part of building a friendly user interface, I needed to build a completely dynamic client side way of selecting colors and allow the user to see the result.  Plus, I wanted to store the values back into the database when the form was posted.  Visually, here's how it looks:

You selected:  

Selected Color:  

Download Code


Robbe has been a Microsoft MVP in C# since 2004.  He is also the co-founder of EggHeadCafe which provides .NET articles, book reviews, software reviews, and software download and purchase advice.

Pete's Blog   |    Pete's Resume   |    Robbe's Blog   |    Robbe's Resume   |    Archive #2   |    Archive #3   |    Dotnetslackers   |    XmlPitStop   |    Advertise   |   Contact Us   |   Privacy   |   Copyright (c) 2000 - 2009 eggheadcafe.com  All rights reserved.