Understanding Color Models
A color model is a mathematical system for representing colors as numerical tuples. Different industries use different models: web designers use HEX and RGB, print designers use CMYK, and artists often prefer HSL or HSB for its intuitive hue-saturation-lightness axes.
HEX (hexadecimal) is the most common format in web development. A HEX code like #1A2B3C encodes three two-digit hexadecimal numbers representing the red, green, and blue intensities from 0 (00) to 255 (FF). RGB separates these same channels into three decimal integers: rgb(26, 43, 60) is the decimal equivalent of #1A2B3C.
HSL (Hue, Saturation, Lightness) maps colors to a cylinder. Hue is an angle (0°–360°) on the color wheel, saturation is the color purity (0%–100%), and lightness is the brightness from black (0%) to white (100%). HSL is intuitive for designers because adjusting only lightness produces shades and tints of the same hue.