Expected Behavior
Color number matches the wiki article "Computer Colors"
Actual Behavior
Color number is hard to understand and does not match the wiki article "Computer Colors"
Operating System and Browser
It has nothing to do with the operating system and browser version.
Steps to Reproduce
Set pen color to different number and draw.

Obviously it does not meet the calculation rules described in the wiki article "Computer Colors":

So I don't know what's the formula from RGB color to Scratch color number.