I would use the CodePlex SPSERVICES project (http://spservices.codeplex.com/), which is compatible with SharePoint 2007.
SPServices is a jQuery library which abstracts SharePoint's Web Services and makes them easier to use. It also includes functions which use the various Web Service operations to provide more useful (and cool) capabilities. It works entirely client side and requires no server install.
There is an example on the following page that shows you how to query a list:
http://spservices.codeplex.com/wikipage?title=GetListItems&referringTitle=Lists
I modified the example from the previous page to address your questions more specifically:
script type="text/javascript" src="filelink/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="filelink/jquery.SPServices-0.6.2.min.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
$().SPServices({
operation: "GetListItems",
async: false,
listName: "Announcements",
CAMLViewFields: "<ViewFields><FieldRef Name='Title' /><FieldRef Name='Priority' /></ViewFields>",
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
var currentItemId = $(this).attr("ows_ID");
var currentItemTitle = $(this).attr("ows_Title");
var currentItemPriority = $(this).attr("ows_Priority");
//TODO: Find the item on the page and change the color
});
}
});
});
</script>
For help with CAML queries, I recommend the SharePoint CAML Query Helper for 2007, 2010, and 2013 (http://spcamlqueryhelper.codeplex.com/).