Skip to content

Commit cac8561

Browse files
Change GetColor to take unsigned int (#1954)
1 parent 1286bc0 commit cac8561

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

parser/raylib_api.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2505,7 +2505,7 @@ Function 308: GetColor() (1 input parameters)
25052505
Name: GetColor
25062506
Return type: Color
25072507
Description: Get Color structure from hexadecimal value
2508-
Param[1]: hexValue (type: int)
2508+
Param[1]: hexValue (type: unsigned int)
25092509
Function 309: GetPixelColor() (2 input parameters)
25102510
Name: GetPixelColor
25112511
Return type: Color

projects/Notepad++/raylib_npp_parser/raylib_to_parse.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ RLAPI Vector3 ColorToHSV(Color color); // R
389389
RLAPI Color ColorFromHSV(float hue, float saturation, float value); // Returns a Color from HSV values
390390
RLAPI Color ColorAlpha(Color color, float alpha); // Returns color with alpha applied, alpha goes from 0.0f to 1.0f
391391
RLAPI Color ColorAlphaBlend(Color dst, Color src, Color tint); // Returns src alpha-blended into dst color with tint
392-
RLAPI Color GetColor(int hexValue); // Get Color structure from hexadecimal value
392+
RLAPI Color GetColor(unsigned int hexValue); // Get Color structure from hexadecimal value
393393
RLAPI Color GetPixelColor(void *srcPtr, int format); // Get Color from a source pixel pointer of certain format
394394
RLAPI void SetPixelColor(void *dstPtr, Color color, int format); // Set color formatted into destination pixel pointer
395395
RLAPI int GetPixelDataSize(int width, int height, int format); // Get pixel data size in bytes for certain format

src/extras/raygui.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@ static const char *GetDirectoryPath(const char *filePath); // -- GuiLoadStyle()
11541154

11551155
// raylib functions already implemented in raygui
11561156
//-------------------------------------------------------------------------------
1157-
static Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value
1157+
static Color GetColor(unsigned int hexValue); // Returns a Color struct from hexadecimal value
11581158
static int ColorToInt(Color color); // Returns hexadecimal value for a Color
11591159
static Color Fade(Color color, float alpha); // Color fade-in or fade-out, alpha goes from 0.0f to 1.0f
11601160
static bool CheckCollisionPointRec(Vector2 point, Rectangle rec); // Check if point is inside rectangle
@@ -4061,7 +4061,7 @@ static Vector3 ConvertHSVtoRGB(Vector3 hsv)
40614061

40624062
#if defined(RAYGUI_STANDALONE)
40634063
// Returns a Color struct from hexadecimal value
4064-
static Color GetColor(int hexValue)
4064+
static Color GetColor(unsigned int hexValue)
40654065
{
40664066
Color color;
40674067

src/raylib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ RLAPI Vector3 ColorToHSV(Color color); // G
12971297
RLAPI Color ColorFromHSV(float hue, float saturation, float value); // Get a Color from HSV values, hue [0..360], saturation/value [0..1]
12981298
RLAPI Color ColorAlpha(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
12991299
RLAPI Color ColorAlphaBlend(Color dst, Color src, Color tint); // Get src alpha-blended into dst color with tint
1300-
RLAPI Color GetColor(int hexValue); // Get Color structure from hexadecimal value
1300+
RLAPI Color GetColor(unsigned int hexValue); // Get Color structure from hexadecimal value
13011301
RLAPI Color GetPixelColor(void *srcPtr, int format); // Get Color from a source pixel pointer of certain format
13021302
RLAPI void SetPixelColor(void *dstPtr, Color color, int format); // Set color formatted into destination pixel pointer
13031303
RLAPI int GetPixelDataSize(int width, int height, int format); // Get pixel data size in bytes for certain format

src/textures.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3711,7 +3711,7 @@ Color ColorAlphaBlend(Color dst, Color src, Color tint)
37113711
}
37123712

37133713
// Get a Color struct from hexadecimal value
3714-
Color GetColor(int hexValue)
3714+
Color GetColor(unsigned int hexValue)
37153715
{
37163716
Color color;
37173717

0 commit comments

Comments
 (0)