rgba
| 192 | |
| 193 | // rgba |
| 194 | void ParseRGBAFullString(char value[8], CanvasColor &output) { |
| 195 | unsigned long hex = 0x00000000 | strtoul(value, nullptr, 16); |
| 196 | // output.rgba = {(hex >> 24) / 255.0f, ((hex & 0xff0000) >> 16) / 255.0f, |
| 197 | // ((hex & 0xff00) >> 8) / 255.0f, (hex & 0xff) / 255.0f}; |
| 198 | output.r = hex >> 24; |
| 199 | output.g = ((hex & 0xff0000) >> 16); |
| 200 | output.b = ((hex & 0xff00) >> 8); |
| 201 | output.a = (hex & 0xff); |
| 202 | } |
| 203 | |
| 204 | bool HandleBraceRGBAColor(char *value, InnerColorRGBA &output) { |
| 205 | int length = (int) strlen(value); |