Click here to Skip to main content
6,306,412 members and growing! (18,072 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
Views:145,794
Bookmarked:91 times
Announcements
Loading...
 
Search    
Advanced Search
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
70 votes for this article.
Popularity: 8.79 Rating: 4.76 out of 5
2 votes, 2.9%
1

2
1 vote, 1.5%
3
2 votes, 2.9%
4
63 votes, 92.6%
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


Member
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
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 25 of 32 (Total in Forum: 32) (Refresh)FirstPrevNext
GeneralFirst Bangladeshi Minilab Web Site, www.minilabbd.com Pinmemberminilabbd6:15 4 May '09  
GeneralHow to use this control in my project?? Pinmemberckietmca0:40 2 Jan '08  
GeneralRe: How to use this control in my project?? Pinmemberckietmca21:16 8 Jan '08  
GeneralDoes function in Firefox PinmemberDavid Rodecker22:26 19 Apr '06  
GeneralRe: Does function in Firefox PinmemberSaad Hasan0:34 6 Oct '06  
GeneralRe: Does function in Firefox Pinmemberwebber12345610:13 22 Jun '07  
GeneralDoesn't Seem to work in IE Pinmemberchris lasater9:28 20 Mar '06  
AnswerRe: Doesn't Seem to work in IE PinmemberViper30000:49 27 Nov '06  
Newsvery good !but…… Pinmemberjerrie_115:38 18 Jan '06  
Generalcolor picker Pinmemberhitman845:33 5 Dec '05  
GeneralRe: color picker PinmemberVenkatakarthikeyan Natarajamoorthy2:11 12 Sep '06  
GeneralAnyone tried using this in Mozilla with moz-behaviors? Pinmembermikebridge13:15 15 Nov '05  
GeneralRe: Anyone tried using this in Mozilla with moz-behaviors? Pinmemberwebber12345610:11 22 Jun '07  
GeneralVery good Pinmemberponto12:29 13 Oct '05  
General.comquery Pinmemberdevraj7007@yahoo.com23:13 5 Sep '05  
Generalquery Pinmemberdevraj700723:12 5 Sep '05  
GeneralBravo PinmemberAbishek Bellamkonda22:08 20 Jun '05  
GeneralHtml PinmemberShahrose17:57 30 Apr '04  
GeneralI like this forum! Pinmemberquocnho18:52 29 Jan '04  
GeneralCool ! Kudos to VN. PinmemberEtchEmKay21:24 20 Nov '03  
GeneralRe: Cool ! Kudos to VN. PinmemberElsen1:49 27 Apr '05  
GeneralInternationalization of HTC? Pinsussklh71720:42 29 Sep '03  
GeneralExcellent Control PinmemberGhanashyam21:52 1 Jul '03  
GeneralWonderful Control PinmemberNavin_2000321:59 30 Jun '03  
GeneralGreat Control... No Discussion PinmemberJarrett Vance9:35 30 Jun '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-2009
Web19 | Advertise on the Code Project