Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
ideas:color-object [2014/07/09 09:54] – Lingering ref to "CSSColor" tabatkinsideas:color-object [2014/07/09 19:25] – Add asKeyword(). tabatkins
Line 14: Line 14:
     static RGBAColor fromHex(octet r, octet g, octet b, optional octet a=255);     static RGBAColor fromHex(octet r, octet g, octet b, optional octet a=255);
     static RGBAColor fromHex(optional HexColorInit color);     static RGBAColor fromHex(optional HexColorInit color);
 +    
 +    DOMString? asKeyword();
 +    /* Add fromKeyword()? Add "keyword" serialization type? Needs rounding. */
          
     DOMString toString(optional DOMString type="rgba");     DOMString toString(optional DOMString type="rgba");
Line 48: Line 51:
   };   };
  
-If parseColor is called with a color that depends on the element on which it is used, +parseColor() takes string containing any CSS color, and returns an RGBAColor for it.  If the string isn't parseable as a color, throw a SyntaxError exception. 
-such as ''currentcolor'' or ''inherit'', + 
-but no el argument was passed, +The optional second argument is used to resolve colors that vary based on the element, such as ''currentcolor''.  If such a color is parsed but the second argument is not provided, throw a XXX exception.
-throw a XXX error.+
 
ideas/color-object.txt · Last modified: 2021/10/01 15:36 by fantasai
Recent changes RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki