Skip to content

LucioPalmucci/ColorToGrayScale-converter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

color to grayscale converter

Color Code To Grayscale Converter

This is a simple javascript shenanigan which converts any given color to its grayscale counterpart. I built this just so I could compare both versions of the same color while drawing or doing artsy stuff. Especially while making pixel art, it is crucial to determine the luminosity index of each color so that you can lay the black and white pixels first and when the dull layout of the scene is ready, then you start to color it.

🌍 Website Is Live Here!

Technologies

Just plain old Javascript also tailwind.

Grayscale Conversion Methods

I used "luminosity" method to calculate the grayscale version of the picked color. But I also have the "average" method available to use as well.

Luminosity Method

grey = (red × 0.3 + green × 0.59 + blue × 0.11)

Average Method

average = (red + green + blue) ÷ 3
rgb(average, average, average) // see what we did here?

Both the methods can be seen in detail here

Preview

preview

About

It converts colors from html input to their grayscale versions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 58.6%
  • HTML 41.4%