The source code for Picking is very compact – you can find it here:
At first glance, it looks like the dependency on P2D / P3D (OpenGL) is in Buffer.java – specifically, the use of PShader (31) and the fact that Buffer extends PGraphics3D (33):
As @TfGuy44 mentioned, you could write your own false-color buffer from scratch (copy the picking concept). As an alternative, you could fork Picking and write your own Buffer
that extends PGraphicsJava2D
instead.