Created
January 22, 2022 21:27
-
-
Save harpwood/7ea04c14a54b071b640ac404c5ce98f7 to your computer and use it in GitHub Desktop.
Converts RGB hex color to BGR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///@description Converts RGB hex color to BGR | |
///@arg color RGB hex color to be converted | |
///@returns BGR hex color | |
///@example draw_set_color(color_fix($FF0000)) | |
function color_fix(color) { | |
return ((argument0 & $FF) << 16) | (argument0 & $FF00) | ((argument0 >> 16) & $FF); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment