Is there any way to find a similar color code when reducing the opacity of any color? For example:
Use a colour picker tool. If you are using graphics software such as Photoshop or GIMP, use the colour picker included. If your image has layers, you may have to change the settings to "sample merged".
If you don't have software like that, there are several tools that you can get that have a colour picker. One that I use is ShareX*, which is free screen capture software, for Windows. It has a Screen color picker tool included.
*Note: I have no affiliation with ShareX. There are many other similar tools available.