S
S
Stas432019-12-27 19:30:18
Working with color
Stas43, 2019-12-27 19:30:18

Correspondence of the RGB color coding and the one in HTML?

The color is set in the form of RGB, for example: 10,6,7
When translated into a hexadecimal system, I get 0xA, 0x6, 0x7, respectively. I cut off all 0x and it remains A,6,7
Now I collect the color definition for html from these values: #A67 There are doubts: is it true? Perhaps you need to pad to two characters, like this: #0A0607
(if it matters, then the question is in connection with parsing RTF \colortbl -> html)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Fodin, 2020-03-02
@Fodin

#A67 is an abbreviation for #AA6677, so is incorrect and needs to be padded with zeros.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question