- DOMRGBColor *rgb([color getRGBColorValue]);
-
- float alpha([[rgb alpha] getFloatValue:DOM_CSS_NUMBER]);
- NSLog(@"alpha:%g", alpha);
-
- if (alpha != 0) {
- colored = true;
-
- [scroller_ setBackgroundColor:[UIColor
- colorWithRed:([[rgb red] getFloatValue:DOM_CSS_NUMBER] / 255)
- green:([[rgb green] getFloatValue:DOM_CSS_NUMBER] / 255)
- blue:([[rgb blue] getFloatValue:DOM_CSS_NUMBER] / 255)
- alpha:alpha
- ]];
+ if ([color primitiveType] == DOM_CSS_RGBCOLOR) {
+ DOMRGBColor *rgb([color getRGBColorValue]);
+
+ float red([[rgb red] getFloatValue:DOM_CSS_NUMBER]);
+ float green([[rgb green] getFloatValue:DOM_CSS_NUMBER]);
+ float blue([[rgb blue] getFloatValue:DOM_CSS_NUMBER]);
+ float alpha([[rgb alpha] getFloatValue:DOM_CSS_NUMBER]);
+
+ UIColor *uic(nil);
+
+ if (red == 0xc7 && green == 0xce && blue == 0xd5)
+ uic = [UIColor pinStripeColor];
+ else if (alpha != 0)
+ uic = [UIColor
+ colorWithRed:(red / 255)
+ green:(green / 255)
+ blue:(blue / 255)
+ alpha:alpha
+ ];
+
+ if (uic != nil) {
+ colored = true;
+ [scroller_ setBackgroundColor:uic];
+ }