Grayscale Color Picker in JavaScript

Опубликовано: 10 Июль 2026
на канале: Michal Ziobro
488
4

This tutorial shows how to write in Java Script program that enables to choose grayscale colour level from 0% to 100%. Application based on user selection in the input field change background colour of rectangular region to suitable grayscale value. In order to achieve this application uses background-color CSS style and sets its value to rgb(X%, X%, X%); where X is value of 100-grayscale colour level.