deftio / ColorMix

Simple HTML Color Mixer with additive and subtractive colors for exploring RGB vs CMY colors.

Home Page:https://deftio.github.io/ColorMix/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ColorMix

A simple html color mixer for exploring RGB (additive light) vs CMY (subtrative light) colors written in pure HTML.

If you download this repo can you view the files in this repo in your browser locally as well.

Online Demos here:

RGB and CMY Colors - a quick demo with sliders allowing you to see different colors

Additive Colors - a quick demo on mixing RGB colors

Subtractive Colors - quick demo on mixing CMY colors.

About Additive and Subtractive Light and Colors

Color perception begins with light, which can be thought of as composed of various colors. When light strikes an object, some colors are absorbed and others are reflected or transmitted. The specific colors that are reflected or transmitted determine the color of the object as perceived by a viewer.

Our ability to see and interpret these colors relies on the specialized cells in our eyes known as cones and rods, which are located on the retina at the back of the eye. Rods are more numerous and are highly sensitive to light, allowing us to see in low-light conditions, but they do not detect color. Cones, on the other hand, are sensitive to color and come in three types, each responsive to different wavelengths of light corresponding to red, green, or blue.

When light enters the eye, it is focused by the lens onto the retina, where it strikes the cones and rods. The cones, reacting to the light, send signals to the brain based on the mix of wavelengths they detect. The brain interprets these signals as colors through a process called color vision. For instance, when red and green wavelengths hit the cones, the brain might see yellow if both are stimulated equally.

This system of color detection and interpretation allows us to perceive a full spectrum of colors from different combinations of red, green, and blue light, explaining how we can see such a vast and nuanced array of colors in the world around us.

Additive Colors

Additive color mixing begins with black, or the absence of light, similar to what you would see in a completely dark room. When light is added to this darkness, it creates color. For example, with light sources like projectors or screens, primary colors of light (red, green, and blue) are combined in various ways to produce new colors:

Red and green light combine to make yellow. Green and blue light mix to create cyan. Blue and red light join to form magenta. When all three primary lights mix, the result is white light. This method is used in digital screens, where tiny pixels emit different levels of these three colors to make up all the colors you see on the device.

Subtractive Colors

Subtractive color mixing starts with white light, which includes all colors. This method is used in painting and printing, where colors are created by removing light. The primary colors in this method are cyan, magenta, and yellow, which correspond to the primary colors of light they absorb:

Cyan absorbs red light but reflects green and blue. Magenta absorbs green light but reflects red and blue. Yellow absorbs blue light but reflects red and green. Mixing these pigments subtracts more wavelengths of light:

Combining cyan and magenta produces blue. Mixing cyan and yellow results in green. Joining yellow and magenta creates red. Mixing all three subtractive colors ideally absorbs all light, resulting in black, though in practice, it often results in a dark brown or gray due to impurities in the colors.

Last Thoughts

Additive color mixing involves combining colored light, where adding more colors brings the result closer to white. Subtractive color mixing involves combining pigments, where adding more colors leads to less light being reflected, moving the result closer to black. These processes allow for the reproduction of a wide spectrum of colors in various media, from art to industrial applications.

About

Simple HTML Color Mixer with additive and subtractive colors for exploring RGB vs CMY colors.

https://deftio.github.io/ColorMix/

License:Other


Languages

Language:HTML 100.0%