Normally a blue flashing light means the PC is in S1 sleep state.
In S3 sleep mode, the light is usually off.
I've never had an orange light when sleeping, so I'm not sure what that indicates.
I couldn't find a manual for the Pavilion P6640D on the HP support site.
When you cleaned RAM, it may have made some BIOS settings changes.
I would go into BIOS setup and check the sleep setting.
If it's set to S1, see if you can change it to S3. Sleep States - See Available Sleep States
Do you have a desktop or laptop?
Maybe the orange light indicates hibernate...???