RGB colors are represented by three values (red, green, blue), each ranging from 0 to 255. Each of these values can be represented by 8 bits, which can be converted to a hexadecimal representation:
0 => 0b00000000 (binary) => 0x00 (hexadecimal)
255 => 0b11111111 (binary) => 0xff (hexadecimal)
The RGB color is represented by a 24-bit sequence, with 8 bits for each color component.