The usual way to grab the code for a particular color in a region in your image is to use the eye-dropper tool in Photoshop or Adobe Illustrator, etc. In Lightroom, you can find them perhaps more easily.
Hover over different areas in your image and note the RBG percent values printed under the histogram. Each color red, green and blue has its own value, which is has a lightness in percent. 100% is white, 0% is black, and in between is that color., For instance, I hovered over a rose petal and got R 74 G 34 B 27%.
You can do this from anywhere in the Develop module in Lightroom.
But is is the most obvious if you use the White Balance eye-dropper in Develop’s Basic panel. Then you get a zoomed-in preview of the color region selected plus the numbers below there as well. Don’t bother to click to change the white balance.
Use a convertor program like
https://convertingcolors.com/mass-conversion.html
if you want to convert to regular RGB (with values between 0 and 255 instead of 0-100%), to Hue-Saturation-Luminance (HSL), to RYB (crudely), or to Hex. HSL is used a lot in other parts of Lightroom. Hex is a standard format; used in Photoshop, design, web site builders like Squarespace, and lots of other programs.Other eye-droppers and adjustment wheels in Lightroom also show the RGB values below the histogram when hovering.