I am new to game development and am trying to make a game which does a simple task: a player touches an object and receives a point. I am using GetColor for collision detection (please do not recommend a different method). Example of my code:

So as you can see, the purpose is to check the next pixel in the direction the player sprite is moving to see if that pixel is the color of the object sprite, and if it is the score goes up by 1 and new objects are spawned. However, no matter what I do, the getColor methods ONLY return white (255, 255, 255). Doesn't matter what color the background is set to, or what color the sprite is, or how many pixels ahead the getColor checks. I am truly stumped.

local screenshot = love.graphics.newScreenshot()
local r, g, b, a = screenshot:getPixel(p1x, p1y+1)
collectgarbage() -- if you will take screenshots every frame without this - you highly probable will have some memory problems

But this is very (VERY) slow solution, because your program needs to copy all screen pixels from gpu-memory to main-memory.
Here is another (slightly better) options using canvases, but this one is simplest you can try.

The best option is never try to get screen pixels. Except some rare situations. Collision detection is not that one

I am new to game development...
...I am using GetColor for collision detection...
...(please do not recommend a different method)...

Allow me to be nice and just point out a few things with the above 3 things.
The first is a totally normal thing, we all started out somewhere!
The second is a bit of a complex thing, because 1. i understand that you want to use the on-screen pixel color to detect collisions, but 2. love.graphics.getColor doesn't do what you want it to, as others have already explained.
The third thing shows a bit of a childish attitude, but even then, people don't want you to change your mind, they just want to offer alternative, more often than not, better solutions;

Now, even if you don't query the screen or a canvas itself for pixel color information, you can still do pixel (or other region)-color-based collisions; Your best bet would be to have a separate array (i'm guessing you're not too familiar with luaJIT's FFI, so let's stick with plain old lua tables), fill that up with data about your world, and whenever you need to test against a pixel on screen, just check that table;
Pros include it being fast, reliable, doesn't unnecessarily move data between the main RAM and the memory on your graphics card, and probably some more that i've forgot to mention. Any cons that there might be are outnumbered by the pros.

Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.

NB: These simple methods and examples work best for worlds that are made of static, axis aligned bitmaps or solid rectangles that are neither scaled nor rotated, and ideally are 1x1 pixels in size. If your world is more complex than that, you gonna need a tiny bit more effort to make things work.