Programming QMK RGB Keyboard

This is not something the keyboards do by default. They can do it, but you need to either find someone who has already created something that is close enough to what you want, or you need to learn to write custom QMK configurations yourself. What you’re looking to do, I think, is sometimes called “Per-key colors”.

If you search the forum for “per-key” you’ll find some posts and topics on doing it. Here is one: How to get to point you can have per key RGB control for keyboard and macropad?
A forum member created a keyboard firmware fork with support for OpenRGB which can allow you to set per-key colors using a GUI (point and click) interface [RESPONDED] OpenRGB support - #4 by tagno25 But it will still take work to install. And the github instuctions may not be clear enough through Google Translate. I could try assist a little, but I do not have an RGB keyboard. Also, by itself / as-is, I do not think the OpenRGB firmware will change colors when NumLock is active, or not active.

This part would be a seperate, additional thing, which you would need to configure / learn how to do.

This part will be more complex. QMK can not do this on its own. The keyboards are USB connected standard keyboards, and do not know what programs are running on your PC. You would need to find or create an app, that runs on your pc, which will monitor running applications and send commands to the keyboards.

I’m afraid writing custom firmware and software is not likely something Framework is going to do. These specific functions which you desire are not things that the RGB keyboards were advertised as doing without the user having any QMK programming knowledge.