Sitemap
Webtips

Explore the world of web technologies through a series of tutorials

Build A Hexagonal Color Picker with CSS & Vanilla JavaScript

Lightweight Color Picker Component. Full Code Implementation.

4 min readApr 9, 2022

--

In most corporate work places today, Microsoft Office products such as Microsoft PowerPoint or Microsoft Word are widely considered to be mandatory productivity tools. Hence, anyone who has dealt with them would be familiar with the following color picker interface:

Screenshot by Author | A view of the hexagonal color picker from Microsoft PowerPoint

On the other hand, many web developers would be aware of the default HTML color picker component rendered with: <input type='color' />

Press enter or click to view image in full size
Screenshot by Author | Originally taken from https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color

Hence, in order for Microsoft Office product users to handle a color picker they are accustomed to, I searched the web for attempts to re-enact the hexagonal interface and managed to find a few implementations which either:

1) Requires external plugins

2) Is Image-Dependent and Code Heavy

--

--

Webtips
Webtips

Published in Webtips

Explore the world of web technologies through a series of tutorials

Charmaine Chui
Charmaine Chui

Written by Charmaine Chui

👩‍💻 Data Analyst. Web & Software Developer. Technical Writer✍ | Trying to make the 🌐 better with baby steps👣 [ 📍SG ] LinkedIn@https://tinyurl.com/5h6cufyy

Responses (1)