In the interview I was asked a question that I was less expected to hear, namely: “How to translate a color from 16-riche to a 10-richery system, while maintaining transparency, and vice versa?”
For example, such a
#FFFFFFFFFFF format is translated into such a
RGB (255, 255, 255) or in
RGBA if transparency is present.
p.s. b>Actually a question in quotes.
Answer 1, Authority 100%
#FFFFFF format translate into such - RGB (255, 255, 255)
We take into account that each pair of six characters in #FFFFFF is a RGB color (Red, Green, Blue), i.e. #FFFFFF – & gt; #FF FF FF, then each symbol from a hexadecimal format is in its binary form, (value for f = 1111), and we get as a result:
then translate into the decimal system each of the three numbers, receiving:
255 255 255
Similarly, with a numeric display of transparency, if present.
The task is not specific for color – if you can translate from a 16-riche system to 10-richene and vice versa, then you can do it at least for flowers, at least for anything.
It’s like a multiplication table – it is alone, and there is no separate table to count apples, separate to count the cigarettes, etc.
This format – #FFFFFF is simply a brief form for recording three 16-riche numbers – (FF, FF, FF).
If you open any calculator program that can translate between the number systems, you will see that FF is 255.
If there is information about transparency in color, then there will be another number.
In the 16-riche system – FF, FF, FF, FF. That is, in a brief form – #FFFFFFFF