-
👋 I'm trying to understand how the conversion from a "16bit" colors hexa (example: The HexColor class parse string, depending on the length, guessing if it's a 8bits form (short like
But:
I'm not at ease with the math behind. It might be "dumb", but I don't get it. Is it just a cross-multiplication? The reason of it behind is I have a Hex convert/parser built in in KT and I would like to use it instead of doing the whole parsing myself... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Got it a bit deeper... It's a simple "ratio". |
Beta Was this translation helpful? Give feedback.
I used the same method as the one that was being used in ImageMagick. I don't know the logic behind this so that is why I asked GitHub copilot for an answer:
The operation that it suggested was
…