I built a sample workflow to test this out and found something interesting: The Get Cell Color activity does not get the color of cells that have been colored by a conditional formatting rule (CFRs make duplicates red). There seems to be a slight technical difference between regularly colored cells and cells colored by CFRs. See also: Getting color of conditional formatting cell and/or How to get the background color from a Conditional Formatting in Excel using VBA - Stack Overflow
Maybe you should look to optimize the process before automating instead. RPA has great ways of finding duplicates in DataTables: https://docs.uipath.com/activities/docs/remove-duplicate-rows - why let the robot work with colors like stoopid hoomans?
Just for completeness let me also address your original issue: If you want to insert a row after the last cell with a specific color, read the full range, use a for each row activity and declare the row index in a variable. Then get the color for the cell by adding desired column letter and the excel row number, which is your row index + an offset of usually 2 (row 0 in datatable is row 2 in excel). Check if the color is your expected color. If it is not, insert the row at that index and break from the for each row loop.