5,696,038 members and growing! (13,201 online)
Email Password   helpLost your password?
Web Development » HTML / CSS » General     Intermediate

Color Picker Control for your Web site – A HTML Component (HTC)

By Venkatakarthikeyan Natarajamoorthy

Color Picker Control for your Web site – A HTML Component (HTC)
Javascript, HTML, Dev

Posted: 28 Jun 2003
Updated: 28 Jun 2003
Views: 130,210
Bookmarked: 87 times
Announcements
Loading...



Search    
Advanced Search
Sitemap
69 votes for this Article.
Popularity: 8.75 Rating: 4.76 out of 5
2 votes, 3.0%
1
0 votes, 0.0%
2
1 vote, 1.5%
3
2 votes, 3.0%
4
62 votes, 92.5%
5

Sample Image - WebPalette.png

Sample image - NamedColors.png

Sample image - SystemColors.png

Sample image - CustomColor.png

Introduction

When I look at the code project articles for color picker control, it has bunch of excellent color picker controls but all are rich-client controls written in MFC, .NET, etc. But no one has written for web environments (thin-clients). If I search web for free ‘web based’ color picker controls, I have to invest lot of money for this. Some sites are providing the controls freely but not looking good. So, here I have tried my best to implement color picker control for web environments. This Color picker control is fully written as a HTC component by using HTML and DHTML.

To learn about HTC please visit:

Special Features

  • Fully functional at client side (pure thin client) and no round trips to the server
  • Reusable HTC Component. So it takes all the advantages of HTC
  • Advanced controls like Tab Control, Tab Pages, Sliders are implemented in this HTC as a normal html pages
  • Look and Feel UI for picking all types of color combinations
  • Color navigations divided into four different regions such as Web palette, Named colors, system colors, custom color (exactly like a Visual Studio.NET IDE Color Picker style)
  • All controls are created at run time and optimized for speed
  • Full "interactive help" like tool tips, descriptions provided to all tab pages

Limitation

At present, only IE 5.0 or later browsers support this HTC technology. Microsoft is still waiting for World Wide Web Consortium adoption. So, to successfully deploy this control on a Web site, a browser detection routine is required to ensure the user is running a version of IE 5.0 or later before launching the components.

Files

This control pack contains the following 4 files :-

  • ColorPicker.htc : Core component contains all business logic implemented by myself.
  • ColorPicker.htm : Html page will be displayed in dialog box and it has one instance of the above ColorPicker.htc component.
  • mpc.htc : Multipage control (tab control for web) implemented by Microsoft
  • MyWebPage.htm : Sample web page using color picker control
     

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Venkatakarthikeyan Natarajamoorthy


Venkat Nataraj works as a Technical Consultant for GE Healthcare, USA. Earlier, he worked as a Software Tech Lead for Dell Inc, System Analyst for Satyam Computer Services and Software Engineering Consultant for GE Power Systems, Bently Nevada. He is an MCSD.NET early achiever. He has been working in the last 9+ years in software design and development of leading-edge business solutions with various development tools, technologies, platforms, and architectures. Here is the latest certifications by him:

• General Electric (GE) Certified GE Green Belt in Six Sigma
• Microsoft Certified Professional (MCP)
• Microsoft Certified Application Developer for Microsoft .NET (MCAD.NET)
• Microsoft Certified Solution Developer for Microsoft .NET (MCSD.NET)
• MCSD.NET Early achiever
• Brainbench Certified Visual C++ programmer
• Computer Society of India (CSI) awarded first place in the inter-college Computer Quiz Competition
• Computer Society of India (CSI) awarded first place in the inter-college Software Contest
• Received “Process Innovation” award from Dell Inc

He spends his free time with music, watching hollywood movies and Sujatha's stories. His favorite musician is Ilayaraja. Bringing real music to his soul and heart. Hariharan is his most favorite singer.
Occupation: Software Developer (Senior)
Location: United States United States

Other popular HTML / CSS articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 25 of 31 (Total in Forum: 31) (Refresh)FirstPrevNext
GeneralHow to use this control in my project??memberckietmca0:40 2 Jan '08  
GeneralRe: How to use this control in my project??memberckietmca21:16 8 Jan '08  
GeneralDoes function in FirefoxmemberDavid Rodecker22:26 19 Apr '06  
GeneralRe: Does function in FirefoxmemberSaad Hasan0:34 6 Oct '06  
GeneralRe: Does function in Firefoxmemberwebber12345610:13 22 Jun '07  
GeneralDoesn't Seem to work in IEmemberchris lasater9:28 20 Mar '06  
AnswerRe: Doesn't Seem to work in IEmemberViper30000:49 27 Nov '06  
Newsvery good !but……memberjerrie_115:38 18 Jan '06  
Generalcolor pickermemberhitman845:33 5 Dec '05  
GeneralRe: color pickermemberVenkatakarthikeyan Natarajamoorthy2:11 12 Sep '06  
GeneralAnyone tried using this in Mozilla with moz-behaviors?membermikebridge13:15 15 Nov '05  
GeneralRe: Anyone tried using this in Mozilla with moz-behaviors?memberwebber12345610:11 22 Jun '07  
GeneralVery goodmemberponto12:29 13 Oct '05  
General.comquerymemberdevraj7007@yahoo.com23:13 5 Sep '05  
Generalquerymemberdevraj700723:12 5 Sep '05  
GeneralBravomemberAbishek Bellamkonda22:08 20 Jun '05  
GeneralHtmlmemberShahrose17:57 30 Apr '04  
GeneralI like this forum!memberquocnho18:52 29 Jan '04  
GeneralCool ! Kudos to VN.memberEtchEmKay21:24 20 Nov '03  
GeneralRe: Cool ! Kudos to VN.memberElsen1:49 27 Apr '05  
GeneralInternationalization of HTC?sussklh71720:42 29 Sep '03  
GeneralExcellent ControlmemberGhanashyam21:52 1 Jul '03  
GeneralWonderful ControlmemberNavin_2000321:59 30 Jun '03  
GeneralGreat Control... No DiscussionmemberJarrett Vance9:35 30 Jun '03  
GeneralRe: Great Control... No DiscussionmemberRichard A. Johnn2:01 10 Jul '03  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 28 Jun 2003
Editor: Nishant Sivakumar
Copyright 2003 by Venkatakarthikeyan Natarajamoorthy
Everything else Copyright © CodeProject, 1999-2008
Web15 | Advertise on the Code Project