What color is that?

Are you starting to program and don't understand how to give the color you want to an element on the screen? Sure, you can "google" it or use ChatGPT, but why not understand it?

RGB

How do I create a color with RGB?

With this model, you'll need to mix different amounts of red, green, and blue.

You just need to learn the format: rgb(red, green, blue).

The color amount ranges from 0 (black) to 255 (maximum red, green, or blue).

Hexadecimal

Hexa (16) are the values of this model: from 0 to the letter F.

The scale is 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, and the letters represent the numbers 10, 11, 12, 13, 14, 15.

The format is: # + 6 numbers or 6 letters (e.g., #000000 represents black).

HSL

HSL (Hue, Saturation, Luminosity)

This model uses these three color properties to create a color.

The format is: HSL (color number, saturation %, luminosity %).

To set the color number, imagine a circle where red is at 0° (number for red: 0), green is at 120° (green: 120), and blue is at 240° (blue: 240).