Take a look at link [1], there are 2 representations - an XML representation, and a GObject based representation.
"Each document has an object tree and an XML tree. Changes in the XML tree are automatically propagated to the object tree via observers"

Whilst running Inkscape you can track the XML tree representation from Edit->XML Editor.
Select a rectangle and you should see a "svg:rect" node selected in the XML Editor.
From there you should see all the rect's attributes including a style attribute (such as fill:#803300;stroke:#aa8800) for the colors.

For source code take a look at class SPObject (src/sp-object.h), and classes derived from SPObject like SPRect (src/sp-rect.h)
"SPObject is an abstract base class of all of the document nodes at the SVG document level. Each SPObject subclass implements a certain SVG element node type..... "

[1] http://wiki.inkscape.org/wiki/index.php/Architectural_overview